class MagicAddresses::CountriesController

Public Instance Methods

index() click to toggle source
# File lib/app/controllers/magic_addresses/countries_controller.rb, line 4
def index
  @countries = ::MagicAddresses::Country.includes(:translations).with_translations(I18n.locale).order( 'mgca_country_translations.name ASC' )
end

Private Instance Methods

instance_params() click to toggle source

Never trust parameters from the scary internet, only allow the white list through.

# File lib/app/controllers/magic_addresses/countries_controller.rb, line 11
def instance_params
  params.require(:country).permit(:name, :default_name, :iso_code, :translations_attributes => [:id, :name, :locale])
end