Sha256: 9ad5b35306bb47d95ee19276d8ffd23f3e72bb3168ca6bd878cf866dc14a3a01

Contents?: true

Size: 556 Bytes

Versions: 10

Compression:

Stored size: 556 Bytes

Contents

class Admin::ZonesController < Admin::ResourceController
  before_filter :load_data, :except => [:index]

  def new
    @zone.zone_members.build
    respond_with(@zone)
  end

  protected

  def collection
    params[:search] ||= {}
    params[:search][:meta_sort] ||= "ascend_by_name"
    @search = super.metasearch(params[:search])
    @zones = @search.relation.page(params[:page]).per(Spree::Config[:orders_per_page])
  end

  def load_data
    @countries = Country.order(:name)
    @states = State.order(:name)
    @zones = Zone.order(:name)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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