Module: ActiveScaffold::Bridges::CountrySelect::FormColumnHelpers

Defined in:
lib/active_scaffold/bridges/country_select/country_select_bridge_helper.rb

Instance Method Summary collapse

Instance Method Details

#active_scaffold_input_country(column, options, ui_options: column.options) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/active_scaffold/bridges/country_select/country_select_bridge_helper.rb', line 4

def active_scaffold_input_country(column, options, ui_options: column.options)
  select_options = {:prompt => as_(:_select_), :priority_countries => ui_options[:priority] || [:us]}
  select_options[:format] = ui_options[:format] if ui_options[:format]
  select_options.merge!(options)
  options.reverse_merge!(ui_options).except!(:prompt, :priority, :format)
  active_scaffold_select_name_with_multiple options
  country_select(:record, column.name, select_options, options.except(:object))
end