Class: Arbo::Rails::Forms::FieldsForProxy

Inherits:
FormBuilderProxy show all
Defined in:
lib/arbo/rails/forms.rb

Instance Attribute Summary

Attributes inherited from FormBuilderProxy

#form_builder

Instance Method Summary collapse

Methods inherited from FormBuilderProxy

#label, #respond_to_missing?, #select

Methods inherited from Component

#initialize, #tag_name

Constructor Details

This class inherits a constructor from Arbo::Component

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Arbo::Rails::Forms::FormBuilderProxy

Instance Method Details

#build(form_builder, *args, &block) ⇒ Object



77
78
79
80
81
82
83
# File 'lib/arbo/rails/forms.rb', line 77

def build(form_builder, *args, &block)
  form_builder.fields_for(*args) do |f|
    @form_builder = f
  end

  super(&block)
end

#render_in(context) ⇒ Object



89
90
91
92
93
# File 'lib/arbo/rails/forms.rb', line 89

def render_in(context)
  children.collect do |element|
    element.render_in_or_to_s(context)
  end.join('')
end

#to_sObject



85
86
87
# File 'lib/arbo/rails/forms.rb', line 85

def to_s
  children.to_s
end