Class: Arbre::Rails::Forms::FormBuilderProxy

Inherits:
Component
  • Object
show all
Defined in:
lib/arbre/rails/forms.rb

Direct Known Subclasses

FieldsForProxy, FormForProxy

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Component

#tag_name

Instance Attribute Details

#form_builderObject (readonly)

Returns the value of attribute form_builder.



7
8
9
# File 'lib/arbre/rails/forms.rb', line 7

def form_builder
  @form_builder
end

Instance Method Details

#label(*args) ⇒ Object

Since label and select are Arbre Elements already, we must override it here instead of letting method_missing deal with it



12
13
14
# File 'lib/arbre/rails/forms.rb', line 12

def label(*args)
  proxy_call_to_form :label, *args
end

#respond_to_missing?(method, include_all) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
23
24
25
26
# File 'lib/arbre/rails/forms.rb', line 20

def respond_to_missing?(method, include_all)
  if form_builder && form_builder.respond_to?(method, include_all)
    true
  else
    super
  end
end

#select(*args) ⇒ Object



16
17
18
# File 'lib/arbre/rails/forms.rb', line 16

def select(*args)
  proxy_call_to_form :select, *args
end