Sha256: 1913106442b41e96c341dfb01751a8914574a530369d859d41a42f4244b75c92

Contents?: true

Size: 597 Bytes

Versions: 55

Compression:

Stored size: 597 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

55 entries across 55 versions & 1 rubygems

Version Path
spree_backend-3.1.0.rc4 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.0.9 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.1.0.rc3 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.1.0.rc2 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.1.0.rc1 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.0.8 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.0.7 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.0.6.1 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.0.6 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.0.5 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.0.4 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.0.3 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.0.2 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.0.1 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.0.0 app/controllers/spree/admin/zones_controller.rb