Class: Interview::PolymorphicAddLink
- Defined in:
- lib/interview/controls/polymorphic_add_link.rb
Overview
todo
Instance Attribute Summary collapse
-
#nested_resource ⇒ Object
Returns the value of attribute nested_resource.
-
#object ⇒ Object
Returns the value of attribute object.
-
#style ⇒ Object
Returns the value of attribute style.
Attributes inherited from Control
Instance Method Summary collapse
Methods inherited from Control
#ancestors, #build, #build_child, #build_with_params, #find_attribute, #find_attribute!, #initialize, #set_attributes, #set_defaults
Constructor Details
This class inherits a constructor from Interview::Control
Instance Attribute Details
#nested_resource ⇒ Object
Returns the value of attribute nested_resource.
4 5 6 |
# File 'lib/interview/controls/polymorphic_add_link.rb', line 4 def nested_resource @nested_resource end |
#object ⇒ Object
Returns the value of attribute object.
4 5 6 |
# File 'lib/interview/controls/polymorphic_add_link.rb', line 4 def object @object end |
#style ⇒ Object
Returns the value of attribute style.
4 5 6 |
# File 'lib/interview/controls/polymorphic_add_link.rb', line 4 def style @style end |
Instance Method Details
#render ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/interview/controls/polymorphic_add_link.rb', line 6 def render if @style and respond_to?("render_#{@style}_style", true) return send("render_#{@style}_style") else return render_dropdown_style end end |