Class: PolymorphicSelect::PolymorphicSelector
- Inherits:
-
Object
- Object
- PolymorphicSelect::PolymorphicSelector
- Includes:
- ActionView::Helpers::FormOptionsHelper, ActionView::Helpers::TagHelper
- Defined in:
- lib/polymorphic_select/polymorphic_selector.rb
Instance Method Summary collapse
-
#initialize(polymorph, choices, options = {}, html_options = {}) ⇒ PolymorphicSelector
constructor
A new instance of PolymorphicSelector.
- #select_polymorph ⇒ Object
Constructor Details
#initialize(polymorph, choices, options = {}, html_options = {}) ⇒ PolymorphicSelector
Returns a new instance of PolymorphicSelector.
8 9 10 11 12 13 |
# File 'lib/polymorphic_select/polymorphic_selector.rb', line 8 def initialize(polymorph, choices, = {}, = {}) @polymorph = polymorph @choices = choices @options = .dup @html_options = .dup end |
Instance Method Details
#select_polymorph ⇒ Object
15 16 17 |
# File 'lib/polymorphic_select/polymorphic_selector.rb', line 15 def select_polymorph (selected_value, @choices) end |