Module: ActionView::Helpers::FormHelper
- Defined in:
- lib/extensible_forms.rb
Instance Method Summary collapse
- #field_set(object_name, name, content = nil, options = {}, &block) ⇒ Object
- #fields_for_with_resource_form_builders(name, *args, &block) ⇒ Object
Instance Method Details
#field_set(object_name, name, content = nil, options = {}, &block) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/extensible_forms.rb', line 18 def field_set(object_name, name, content = nil, = {}, &block) .delete(:object) [:name] ||= name [:id] ||= name content ||= self.capture(&block) if block_given? content_tag("fieldset", raw(content), ).html_safe end |
#fields_for_with_resource_form_builders(name, *args, &block) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/extensible_forms.rb', line 8 def fields_for_with_resource_form_builders(name, *args, &block) name = singular_class_name(name) unless name.class.in?(String, Symbol) = args.last.is_a?(Hash) ? args.last : {} [:builder] ||= pick_form_builder(name) fields_for_without_resource_form_builders(name, *args, &block) end |