Class: FormProps::Inputs::Base
- Inherits:
-
ActionView::Helpers::Tags::Base
- Object
- ActionView::Helpers::Tags::Base
- FormProps::Inputs::Base
- Defined in:
- lib/form_props/inputs/base.rb
Direct Known Subclasses
CheckBox, CollectionCheckBoxes, CollectionRadioButtons, CollectionSelect, GroupedCollectionSelect, RadioButton, Select, Submit, TextArea, TextField, TimeZoneSelect, WeekdaySelect
Instance Method Summary collapse
-
#initialize(object_name, method_name, template_object, options = {}) ⇒ Base
constructor
A new instance of Base.
- #json ⇒ Object
Constructor Details
#initialize(object_name, method_name, template_object, options = {}) ⇒ Base
Returns a new instance of Base.
10 11 12 13 14 15 16 17 |
# File 'lib/form_props/inputs/base.rb', line 10 def initialize(object_name, method_name, template_object, = {}) = .with_indifferent_access @controlled = .delete(:controlled) @key = .delete(:key) super(object_name, method_name, template_object, ) end |
Instance Method Details
#json ⇒ Object
6 7 8 |
# File 'lib/form_props/inputs/base.rb', line 6 def json @json ||= @template_object.instance_variable_get(:@__json) end |