Module: ClientSideValidations::SimpleForm::FormBuilder
- Defined in:
- lib/client_side_validations/simple_form/form_builder.rb
Instance Method Summary collapse
- #client_side_form_settings(options, _form_helper) ⇒ Object
- #input(attribute_name, options = {}, &block) ⇒ Object
Instance Method Details
#client_side_form_settings(options, _form_helper) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/client_side_validations/simple_form/form_builder.rb', line 6 def client_side_form_settings(, _form_helper) { type: self.class.name, error_class: wrapper_error_component.defaults[:class].join(' '), error_tag: wrapper_error_component.defaults[:tag], wrapper_error_class: wrapper.defaults[:error_class], wrapper_tag: wrapper.defaults[:tag], wrapper_class: wrapper.defaults[:class].join(' '), wrapper: [:wrapper] || ::SimpleForm.default_wrapper } end |
#input(attribute_name, options = {}, &block) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/client_side_validations/simple_form/form_builder.rb', line 18 def input(attribute_name, = {}, &block) if .key?(:validate) [:input_html] ||= {} [:input_html][:validate] = [:validate] .delete(:validate) end super(attribute_name, , &block) end |