Class: ActionView::Helpers::CountrySelect

Inherits:
InstanceTag
  • Object
show all
Includes:
CountrySelect::TagHelper
Defined in:
lib/country_select/rails3/country_select_helper.rb

Instance Method Summary collapse

Methods included from CountrySelect::TagHelper

#country_option_tags

Instance Method Details

#render(options, html_options) ⇒ Object


25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/country_select/rails3/country_select_helper.rb', line 25

def render(options, html_options)
  @options = options
  @html_options = html_options

  if self.respond_to?(:select_content_tag)
    (country_option_tags, @options, @html_options)
  else
    html_options = @html_options.stringify_keys
    add_default_name_and_id(html_options)
    (:select, add_options(country_option_tags, options, value(object)), html_options)
  end
end