Sha256: 9270252dfab6e029097cfce23672267c752e60f82e199a69e6306a0b29a66924

Contents?: true

Size: 570 Bytes

Versions: 15

Compression:

Stored size: 570 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

      private

        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

15 entries across 15 versions & 1 rubygems

Version Path
solidus_backend-1.2.3 app/controllers/spree/admin/states_controller.rb
solidus_backend-1.1.4 app/controllers/spree/admin/states_controller.rb
solidus_backend-1.2.2 app/controllers/spree/admin/states_controller.rb
solidus_backend-1.2.1 app/controllers/spree/admin/states_controller.rb
solidus_backend-1.1.3 app/controllers/spree/admin/states_controller.rb
solidus_backend-1.2.0 app/controllers/spree/admin/states_controller.rb
solidus_backend-1.2.0.rc2 app/controllers/spree/admin/states_controller.rb
solidus_backend-1.1.2 app/controllers/spree/admin/states_controller.rb
solidus_backend-1.2.0.rc1 app/controllers/spree/admin/states_controller.rb
solidus_backend-1.2.0.beta1 app/controllers/spree/admin/states_controller.rb
solidus_backend-1.1.1 app/controllers/spree/admin/states_controller.rb
solidus_backend-1.1.0 app/controllers/spree/admin/states_controller.rb
solidus_backend-1.1.0.pre2 app/controllers/spree/admin/states_controller.rb
solidus_backend-1.1.0.pre1 app/controllers/spree/admin/states_controller.rb
solidus_backend-1.1.0.beta1 app/controllers/spree/admin/states_controller.rb