Sha256: 8a4cc2232d563570bb911b801c6a5f9cbc031c0f91a7ddaa6567dd691bd5a1ad

Contents?: true

Size: 520 Bytes

Versions: 54

Compression:

Stored size: 520 Bytes

Contents

# encoding: utf-8
class MagicAddresses::CountriesController < MagicAddresses::BaseController
  
  def index
    @countries = ::MagicAddresses::Country.includes(:translations).with_translations(I18n.locale).order( 'mgca_country_translations.name ASC' )
  end
  
  private

    # Never trust parameters from the scary internet, only allow the white list through.
    def instance_params
      params.require(:country).permit(:name, :default_name, :iso_code, :translations_attributes => [:id, :name, :locale])
    end

end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
magic_addresses-0.0.14 lib/app/controllers/magic_addresses/countries_controller.rb
magic_addresses-0.0.13 lib/app/controllers/magic_addresses/countries_controller.rb
magic_addresses-0.0.12 lib/app/controllers/magic_addresses/countries_controller.rb
magic_addresses-0.0.11 lib/app/controllers/magic_addresses/countries_controller.rb
magic_addresses-0.0.10 lib/app/controllers/magic_addresses/countries_controller.rb
magic_addresses-0.0.9 lib/app/controllers/magic_addresses/countries_controller.rb
magic_addresses-0.0.8 lib/app/controllers/magic_addresses/countries_controller.rb
magic_addresses-0.0.7 lib/app/controllers/magic_addresses/countries_controller.rb
magic_addresses-0.0.6 lib/app/controllers/magic_addresses/countries_controller.rb
magic_addresses-0.0.5 lib/app/controllers/magic_addresses/countries_controller.rb
magic_addresses-0.0.4 lib/app/controllers/magic_addresses/countries_controller.rb
magic_addresses-0.0.3 lib/app/controllers/magic_addresses/countries_controller.rb
magic_addresses-0.0.2 app/controllers/magic_addresses/countries_controller.rb
magic_addresses-0.0.1 app/controllers/magic_addresses/countries_controller.rb