Class: VCFB::Component::GroupedCollectionSelect
- Defined in:
- lib/vcfb/component/grouped_collection_select.rb
Instance Method Summary collapse
- #form_element(options = {}, html_options = {}) ⇒ Object
-
#initialize(form, method, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {}) ⇒ GroupedCollectionSelect
constructor
A new instance of GroupedCollectionSelect.
Methods inherited from Base
#collection_check_boxes, #collection_radio_buttons
Constructor Details
#initialize(form, method, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {}) ⇒ GroupedCollectionSelect
Returns a new instance of GroupedCollectionSelect.
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/vcfb/component/grouped_collection_select.rb', line 4 def initialize(form, method, collection, group_method, group_label_method, option_key_method, option_value_method, = {}, = {}) run_callbacks :initialize do @form = form @method = method @collection = collection @group_method = group_method @group_label_method = group_label_method @option_key_method = option_key_method @option_value_method = option_value_method @options = defined?(TagOptions::Hash) ? TagOptions::Hash.new() : @html_options = defined?(TagOptions::Hash) ? TagOptions::Hash.new() : end end |
Instance Method Details
#form_element(options = {}, html_options = {}) ⇒ Object
18 19 20 |
# File 'lib/vcfb/component/grouped_collection_select.rb', line 18 def form_element( = {}, = {}) grouped_collection_select(@form.object_name, @method, @collection, @group_method, @group_label_method, @option_key_method, @option_value_method, , ) end |