Class: Arbo::Rails::Forms::FormBuilderProxy
- Defined in:
- lib/arbo/rails/forms.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#form_builder ⇒ Object
readonly
Returns the value of attribute form_builder.
Instance Method Summary collapse
-
#label(*args) ⇒ Object
Since label and select are Arbo Elements already, we must override it here instead of letting method_missing deal with it.
- #respond_to_missing?(method, include_all) ⇒ Boolean
- #select(*args) ⇒ Object
Methods inherited from Component
Constructor Details
This class inherits a constructor from Arbo::Component
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object (private)
33 34 35 36 37 38 39 |
# File 'lib/arbo/rails/forms.rb', line 33 def method_missing(method, *args, &block) if form_builder && form_builder.respond_to?(method) proxy_call_to_form(method, *args, &block) else super end end |
Instance Attribute Details
#form_builder ⇒ Object (readonly)
Returns the value of attribute form_builder.
6 7 8 |
# File 'lib/arbo/rails/forms.rb', line 6 def form_builder @form_builder end |
Instance Method Details
#label(*args) ⇒ Object
Since label and select are Arbo Elements already, we must override it here instead of letting method_missing deal with it
11 12 13 |
# File 'lib/arbo/rails/forms.rb', line 11 def label(*args) proxy_call_to_form :label, *args end |
#respond_to_missing?(method, include_all) ⇒ Boolean
19 20 21 22 23 24 25 |
# File 'lib/arbo/rails/forms.rb', line 19 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
15 16 17 |
# File 'lib/arbo/rails/forms.rb', line 15 def select(*args) proxy_call_to_form :select, *args end |