Module: ActiveScaffold::Bridges::CountryHelper::FormColumnHelpers

Defined in:
lib/active_scaffold/bridges/country_helper/country_helper_bridge.rb

Instance Method Summary collapse

Instance Method Details

#active_scaffold_input_country(column, options) ⇒ Object



328
329
330
331
332
333
334
# File 'lib/active_scaffold/bridges/country_helper/country_helper_bridge.rb', line 328

def active_scaffold_input_country(column, options)
  select_options = {:prompt => as_(:_select_)}
  select_options.merge!(options)
  options.reverse_merge!(column.options).except!(:prompt, :priority)
  options[:name] += '[]' if options[:multiple]
  country_select(:record, column.name, column.options[:priority] || [:united_states], select_options, options)
end

#active_scaffold_input_usa_state(column, options) ⇒ Object



336
337
338
339
340
341
342
# File 'lib/active_scaffold/bridges/country_helper/country_helper_bridge.rb', line 336

def active_scaffold_input_usa_state(column, options)
  select_options = {:prompt => as_(:_select_)}
  select_options.merge!(options)
  options.reverse_merge!(column.options).except!(:prompt, :priority)
  options[:name] += '[]' if options[:multiple]
  usa_state_select(:record, column.name, column.options[:priority], select_options, options)
end