Class: CountryOptionsSelect::CountryOptionsSelectTag
- Inherits:
-
ActionView::Helpers::Tags::Base
- Object
- ActionView::Helpers::Tags::Base
- CountryOptionsSelect::CountryOptionsSelectTag
- Defined in:
- lib/country_options_select/helpers/select_tag.rb
Instance Method Summary collapse
-
#initialize(select_type, object_name, method_name, template_object, options, html_options) ⇒ CountryOptionsSelectTag
constructor
A new instance of CountryOptionsSelectTag.
- #render ⇒ Object
Constructor Details
#initialize(select_type, object_name, method_name, template_object, options, html_options) ⇒ CountryOptionsSelectTag
Returns a new instance of CountryOptionsSelectTag.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/country_options_select/helpers/select_tag.rb', line 5 def initialize(select_type, object_name, method_name, template_object, , ) @select_type = select_type = .dup @country_select_options = .extract!(*%i(text_format updates removals options_override order selected disabled html_attributes)) @html_options = super(object_name, method_name, template_object, ) end |
Instance Method Details
#render ⇒ Object
16 17 18 19 20 |
# File 'lib/country_options_select/helpers/select_tag.rb', line 16 def render select_content_tag( send("country_#{@select_type}_for_select", **@country_select_options), @options, @html_options ) end |