Class: AdminAssistant::MultiFormView::Builder
- Inherits:
-
ActionView::Helpers::FormBuilder
- Object
- ActionView::Helpers::FormBuilder
- AdminAssistant::MultiFormView::Builder
- Defined in:
- lib/admin_assistant/form_view.rb
Defined Under Namespace
Classes: SubFormBuilder
Instance Method Summary collapse
- #each_sub_form ⇒ Object
-
#initialize(object_name, object, template, options, proc) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(object_name, object, template, options, proc) ⇒ Builder
Returns a new instance of Builder.
108 109 110 111 |
# File 'lib/admin_assistant/form_view.rb', line 108 def initialize(object_name, object, template, , proc) super(object_name, object, template, , proc) @sub_form_views = [:sub_form_views] end |
Instance Method Details
#each_sub_form ⇒ Object
113 114 115 116 117 118 119 120 |
# File 'lib/admin_assistant/form_view.rb', line 113 def each_sub_form @object.each_with_index do |obj, i| builder = SubFormBuilder.new( @object_name, obj, @template, @options, @proc, i ) yield builder, @sub_form_views[i] end end |