Sha256: b98a63c18ba1c08a5fdcc719666a021337b038f7dd83bd58fca5592141bec5cd

Contents?: true

Size: 443 Bytes

Versions: 10

Compression:

Stored size: 443 Bytes

Contents

class Admin::StatesController < Admin::ResourceController
  belongs_to :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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spree_core-0.70.7 app/controllers/admin/states_controller.rb
spree_core-0.70.6 app/controllers/admin/states_controller.rb
spree_core-0.70.5 app/controllers/admin/states_controller.rb
spree_core-0.70.4 app/controllers/admin/states_controller.rb
spree_core-0.70.3 app/controllers/admin/states_controller.rb
spree_core-0.70.2 app/controllers/admin/states_controller.rb
spree_core-0.70.1 app/controllers/admin/states_controller.rb
spree_core-0.70.0 app/controllers/admin/states_controller.rb
spree_core-0.70.0.rc2 app/controllers/admin/states_controller.rb
spree_core-0.70.RC1 app/controllers/admin/states_controller.rb