Sha256: 0d1437eadbdc383b33948e0c56a191becc12ede9f1e3ae340ee2e899efc05116

Contents?: true

Size: 608 Bytes

Versions: 37

Compression:

Stored size: 608 Bytes

Contents

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

      def new
        @zone.zone_members.build
      end

      protected

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

37 entries across 37 versions & 1 rubygems

Version Path
spree_backend-2.3.13 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.2.14 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.3.12 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.2.13 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.3.11 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.2.12 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.3.10 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.3.9 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.2.11 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.2.10 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.3.8 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.3.7 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.2.9 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.1.12 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.3.6 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.2.8 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.1.11 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.3.5 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.2.7 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.1.10 app/controllers/spree/admin/zones_controller.rb