Class: Headmin::Form::SearchView
- Includes:
- Autocompletable, Hintable, InputGroupable, Labelable, Listable, Placeholderable, Validatable, Wrappable
- Defined in:
- app/models/headmin/form/search_view.rb
Instance Method Summary collapse
Methods inherited from ViewModel
#attributes, #initialize, #to_hash
Constructor Details
This class inherits a constructor from ViewModel
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ViewModel
Instance Method Details
#input_group_options ⇒ Object
20 21 22 23 24 25 |
# File 'app/models/headmin/form/search_view.rb', line 20 def .deep_merge() .deep_merge() .deep_merge(@input_group || {}) end |
#input_options ⇒ Object
13 14 15 16 17 18 |
# File 'app/models/headmin/form/search_view.rb', line 13 def keys = attributes - %i[append attribute collection float form input_group label prepend validate wrapper] = to_h.slice(*keys) = .deep_merge() .deep_merge() end |
#wrapper_options ⇒ Object
27 28 29 30 31 |
# File 'app/models/headmin/form/search_view.rb', line 27 def .deep_merge({ class: ["mb-3", ("form-floating" if float)] }).deep_merge(@wrapper || {}) end |