Module: Uberkit::Forms::Helper
- Defined in:
- lib/uberkit/forms/helper.rb
Instance Method Summary collapse
- #parse_options(*args) ⇒ Object
- #remote_uberform_for(name_or_object_or_array, *args, &proc) ⇒ Object
- #uberform_for(name_or_object_or_array, *args, &proc) ⇒ Object
Instance Method Details
#parse_options(*args) ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/uberkit/forms/helper.rb', line 2 def (*args) = args. .merge!(:builder => Uberkit::Forms::Builder) [:html] ||= {} class_names = [:html][:class] ? [:html][:class].split(" ") : [] class_names << "uberform" class_names << .delete(:kind).to_s [:html][:class] = class_names.join(" ") args << end |
#remote_uberform_for(name_or_object_or_array, *args, &proc) ⇒ Object
18 19 20 21 |
# File 'lib/uberkit/forms/helper.rb', line 18 def remote_uberform_for(name_or_object_or_array, *args, &proc) args = (*args) remote_form_for(name_or_object_or_array, *args, &proc) end |
#uberform_for(name_or_object_or_array, *args, &proc) ⇒ Object
13 14 15 16 |
# File 'lib/uberkit/forms/helper.rb', line 13 def uberform_for(name_or_object_or_array, *args, &proc) args = (*args) form_for(name_or_object_or_array, *args, &proc) end |