Class: Trestle::Form::Fields::RangeField
- Inherits:
-
Trestle::Form::Field
- Object
- Trestle::Form::Field
- Trestle::Form::Fields::RangeField
- Defined in:
- lib/trestle/form/fields/range_field.rb
Instance Attribute Summary
Attributes inherited from Trestle::Form::Field
#block, #builder, #name, #options, #template
Instance Method Summary collapse
Methods inherited from Trestle::Form::Field
#defaults, #errors, #form_group, #initialize, #readonly?, #render
Constructor Details
This class inherits a constructor from Trestle::Form::Field
Instance Method Details
#custom? ⇒ Boolean
9 10 11 |
# File 'lib/trestle/form/fields/range_field.rb', line 9 def custom? [:custom] != false end |
#field ⇒ Object
5 6 7 |
# File 'lib/trestle/form/fields/range_field.rb', line 5 def field builder.raw_range_field(name, ) end |
#normalize_options! ⇒ Object
13 14 15 16 17 |
# File 'lib/trestle/form/fields/range_field.rb', line 13 def .reverse_merge!(class: ["custom-range"]) if custom? super end |