Sha256: 9fb9f80829192db56a0585c77b78c1d47b362f27223aa8b8312da8ae03b26c54

Contents?: true

Size: 650 Bytes

Versions: 22

Compression:

Stored size: 650 Bytes

Contents

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

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

      protected

        def collection
          params[:q] ||= {}
          params[:q][:s] ||= "ascend_by_name"
          @search = super.ransack(params[:q])
          @zones = @search.result.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
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
spree_core-1.3.5 app/controllers/spree/admin/zones_controller.rb
spree_core-1.3.4 app/controllers/spree/admin/zones_controller.rb
spree_core-1.3.3 app/controllers/spree/admin/zones_controller.rb
spree_core-1.2.5 app/controllers/spree/admin/zones_controller.rb
spree_core-1.1.6 app/controllers/spree/admin/zones_controller.rb
spree_core-1.1.5 app/controllers/spree/admin/zones_controller.rb
spree_core-1.2.4 app/controllers/spree/admin/zones_controller.rb
spree_core-1.3.2 app/controllers/spree/admin/zones_controller.rb
spree_core-1.2.3 app/controllers/spree/admin/zones_controller.rb
spree_core-1.3.1 app/controllers/spree/admin/zones_controller.rb
spree_core-1.3.0 app/controllers/spree/admin/zones_controller.rb
spree_core-1.3.0.rc2 app/controllers/spree/admin/zones_controller.rb
dup_spree_core-1.3.0.rc1 app/controllers/spree/admin/zones_controller.rb
spree_core-1.3.0.rc1 app/controllers/spree/admin/zones_controller.rb
spree_core-1.2.2 app/controllers/spree/admin/zones_controller.rb
spree_core-1.1.4 app/controllers/spree/admin/zones_controller.rb
spree_core-1.2.0 app/controllers/spree/admin/zones_controller.rb
spree_core-1.2.0.rc2 app/controllers/spree/admin/zones_controller.rb
spree_core-1.2.0.rc1 app/controllers/spree/admin/zones_controller.rb
spree_core-1.1.3 app/controllers/spree/admin/zones_controller.rb