Sha256: 49c395f0561306ec5e96df388bc836fd52d8b524236936c76782e932a05ab241

Contents?: true

Size: 569 Bytes

Versions: 24

Compression:

Stored size: 569 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 = Country.order(:name)
        end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
spree_backend-3.2.9 app/controllers/spree/admin/states_controller.rb
spree_backend-3.3.6 app/controllers/spree/admin/states_controller.rb
spree_backend-3.2.8 app/controllers/spree/admin/states_controller.rb
spree_backend-3.3.5 app/controllers/spree/admin/states_controller.rb
spree_backend-3.3.4 app/controllers/spree/admin/states_controller.rb
spree_backend-3.2.7 app/controllers/spree/admin/states_controller.rb
spree_backend-3.3.3 app/controllers/spree/admin/states_controller.rb
spree_backend-3.2.6 app/controllers/spree/admin/states_controller.rb
spree_backend-3.3.2 app/controllers/spree/admin/states_controller.rb
spree_backend-3.2.5 app/controllers/spree/admin/states_controller.rb
spree_backend-3.3.1 app/controllers/spree/admin/states_controller.rb
spree_backend-3.2.4 app/controllers/spree/admin/states_controller.rb
spree_backend-3.3.0 app/controllers/spree/admin/states_controller.rb
spree_backend-3.3.0.rc4 app/controllers/spree/admin/states_controller.rb
spree_backend-3.3.0.rc3 app/controllers/spree/admin/states_controller.rb
spree_backend-3.2.3 app/controllers/spree/admin/states_controller.rb
spree_backend-3.2.2 app/controllers/spree/admin/states_controller.rb
spree_backend-3.3.0.rc2 app/controllers/spree/admin/states_controller.rb
spree_backend-3.3.0.rc1 app/controllers/spree/admin/states_controller.rb
spree_backend-3.2.1 app/controllers/spree/admin/states_controller.rb