Sha256: 85f84e0dbe58bd2c4b0cdb7cb062165d490b8329dc87faa059e2e7eac6956d89

Contents?: true

Size: 603 Bytes

Versions: 30

Compression:

Stored size: 603 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] ||= "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

30 entries across 30 versions & 2 rubygems

Version Path
solidus_backend-1.0.7 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.0.6 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.0.5 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.0.4 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.0.3 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.0.2 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.4.10 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.0.1 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.0.0 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.0.0.rc2 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.0.0.rc1 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.4.9 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.0.0.pre3 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.0.0.pre2 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.4.8 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.0.0.pre app/controllers/spree/admin/zones_controller.rb
spree_backend-2.4.7 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.4.6 app/controllers/spree/admin/zones_controller.rb
spree_backend-2.4.5 app/controllers/spree/admin/zones_controller.rb
spree_backend-3.0.0.rc4 app/controllers/spree/admin/zones_controller.rb