Module: JqueryUiForm::Helpers::FormHelper
- Defined in:
- lib/jquery_ui_form/helpers/form_helper.rb
Instance Attribute Summary collapse
-
#autofocus ⇒ Object
Returns the value of attribute autofocus.
Instance Method Summary collapse
Instance Attribute Details
#autofocus ⇒ Object
Returns the value of attribute autofocus.
4 5 6 |
# File 'lib/jquery_ui_form/helpers/form_helper.rb', line 4 def autofocus @autofocus end |
Instance Method Details
#jquery_fields_for(name, *args, &block) ⇒ Object
16 17 18 19 20 |
# File 'lib/jquery_ui_form/helpers/form_helper.rb', line 16 def jquery_fields_for(name, *args, &block) = args.last.is_a?(Hash) ? args.pop : {} [:builder] ||= JqueryUiForm::FormBuilder fields_for(name, *(args << ), &block) end |
#jquery_form_for(name, *args, &block) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/jquery_ui_form/helpers/form_helper.rb', line 5 def jquery_form_for(name, *args, &block) = args.last.is_a?(Hash) ? args.pop : {} [:builder] ||= JqueryUiForm::FormBuilder [:html] ||= {} [:html][:novalidate] ||= .delete(:novalidate) self.autofocus = .delete(:autofocus) self.autofocus = true if self.autofocus.nil? ([:html][:class] ||= "") << " ui-form" form_for(name, *(args << ), &block) end |