Sha256: d84f6d475c307649b3b99fd31727bce8e6a33a2923bb3b1dc1aff68e7f24cfa6

Contents?: true

Size: 575 Bytes

Versions: 112

Compression:

Stored size: 575 Bytes

Contents

module Spree
  module Admin
    class ZonesController < ResourceController
      before_action :load_data, except: :index

      def new
        @zone.zone_members.build
      end

      protected

      def collection
        params[:q] ||= {}
        params[:q][:s] ||= 'name asc'
        @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

112 entries across 112 versions & 1 rubygems

Version Path
spree_backend-4.2.0 app/controllers/spree/admin/zones_controller.rb
spree_backend-4.2.0.rc5 app/controllers/spree/admin/zones_controller.rb
spree_backend-4.2.0.rc4 app/controllers/spree/admin/zones_controller.rb
spree_backend-4.2.0.rc3 app/controllers/spree/admin/zones_controller.rb
spree_backend-4.1.13 app/controllers/spree/admin/zones_controller.rb
spree_backend-4.0.6 app/controllers/spree/admin/zones_controller.rb
spree_backend-4.2.0.rc2 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.7.13 app/controllers/spree/admin/zones_controller.rb
spree_backend-4.0.5 app/controllers/spree/admin/zones_controller.rb
spree_backend-4.1.12 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.7.12 app/controllers/spree/admin/zones_controller.rb
spree_backend-4.2.0.rc1 app/controllers/spree/admin/zones_controller.rb
spree_backend-4.0.4 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.7.11 app/controllers/spree/admin/zones_controller.rb
spree_backend-4.1.11 app/controllers/spree/admin/zones_controller.rb
spree_backend-4.1.10 app/controllers/spree/admin/zones_controller.rb
spree_backend-4.2.0.beta app/controllers/spree/admin/zones_controller.rb
spree_backend-4.1.9 app/controllers/spree/admin/zones_controller.rb
spree_backend-4.1.8 app/controllers/spree/admin/zones_controller.rb
spree_backend-4.1.7 app/controllers/spree/admin/zones_controller.rb