Class: ActionView::Helpers::FormBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/country_select/country_select_helper.rb,
lib/country_select/rails3/country_select_helper.rb

Instance Method Summary collapse

Instance Method Details

#country_select(method, priority_or_options = {}, options = {}, html_options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/country_select/country_select_helper.rb', line 4

def country_select(method, priority_or_options = {}, options = {}, html_options = {})
  if Hash === priority_or_options
    html_options = options
    options = priority_or_options
  else
    options[:priority_countries] = priority_or_options
  end

  @template.country_select(@object_name, method, objectify_options(options), @default_options.merge(html_options))
end