Class: ActionView::Helpers::FormBuilder

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

Instance Method Summary collapse

Instance Method Details

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



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

def country_select(method, options = {}, html_options = {})
  unless options.is_a?(Hash)
    raise ArgumentError, 'Invalid syntax for country_select method. options must be a hash'
  end

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