Sha256: 5e6b93c08d040add5cd9523cecec62ab517a3412fb5147f8bb09b539f71fee50

Contents?: true

Size: 554 Bytes

Versions: 11

Compression:

Stored size: 554 Bytes

Contents

module Spree
  module Admin
    class StatesController < ResourceController
      belongs_to 'spree/country'
      before_filter :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

11 entries across 11 versions & 1 rubygems

Version Path
spree_core-1.0.7 app/controllers/spree/admin/states_controller.rb
spree_core-1.0.6 app/controllers/spree/admin/states_controller.rb
spree_core-1.0.4 app/controllers/spree/admin/states_controller.rb
spree_core-1.0.3 app/controllers/spree/admin/states_controller.rb
spree_core-1.0.2 app/controllers/spree/admin/states_controller.rb
spree_core-1.0.1 app/controllers/spree/admin/states_controller.rb
spree_core-1.0.0 app/controllers/spree/admin/states_controller.rb
spree_core-1.0.0.rc4 app/controllers/spree/admin/states_controller.rb
spree_core-1.0.0.rc3 app/controllers/spree/admin/states_controller.rb
spree_core-1.0.0.rc2 app/controllers/spree/admin/states_controller.rb
spree_core-1.0.0.rc1 app/controllers/spree/admin/states_controller.rb