Sha256: 4f1b78d91aff0c085d62e8fd9e7d86b08ffc2e6fac8c8fd8c080faf838b12d1a
Contents?: true
Size: 734 Bytes
Versions: 54
Compression:
Stored size: 734 Bytes
Contents
# encoding: utf-8 class MagicAddresses::DistrictsController < MagicAddresses::BaseController def index # @districts = ::MagicAddresses::District.includes(:translations).with_translations(I18n.locale).order( 'mgca_district_translations.name ASC' ) # @districts = ::MagicAddresses::District.includes(:translations).order("mgca_district_translations.name ASC") @districts = ::MagicAddresses::District.includes(:translations).order(short_name: :asc) end private # Never trust parameters from the scary internet, only allow the white list through. def instance_params params.require(:district).permit(:name, :default_name, :short_name, :translations_attributes => [:id, :name, :locale]) end end
Version data entries
54 entries across 54 versions & 1 rubygems