Module: ActiveScaffold::Bridges::CountrySelect::ListColumnHelpers

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

Instance Method Summary collapse

Instance Method Details

#active_scaffold_column_country(record, column) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/active_scaffold/bridges/country_select/country_select_bridge_helper.rb', line 14

def active_scaffold_column_country(record, column)
  country_code = record.send(column.name)
  return if country_code.blank?
  country = ISO3166::Country[country_code]
  return country_code unless country
  country.translations[I18n.locale.to_s] || country.name
end