Class: ActionView::Helpers::LanguageSelectRails

Inherits:
InstanceTag
  • Object
show all
Includes:
LanguageSelectRails::TagHelper
Defined in:
lib/language_select_rails/rails3/language_select_rails_helper.rb

Instance Method Summary collapse

Methods included from LanguageSelectRails::TagHelper

#language_option_tags

Instance Method Details

#render(options, html_options) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/language_select_rails/rails3/language_select_rails_helper.rb', line 18

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

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