Sha256: bbaf27873479a9af70316a39cfdc0e414257c101911d48547d45021a3835e0fd
Contents?: true
Size: 587 Bytes
Versions: 35
Compression:
Stored size: 587 Bytes
Contents
module Spree module Admin class StatesController < ResourceController belongs_to 'spree/country' before_action :load_data def index respond_with(@collection) do |format| format.html format.js { render partial: 'state_list' } end end protected def location_after_save admin_country_states_url(@country) end def collection super.order(:name) end def load_data @countries = Spree::Country.where(states_required: true).order(:name) end end end end
Version data entries
35 entries across 35 versions & 1 rubygems