Sha256: 733af452b999536fa369971247ccce52d171354d293ab415017837b1555253a1

Contents?: true

Size: 573 Bytes

Versions: 21

Compression:

Stored size: 573 Bytes

Contents

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

      def new
        @zone.zone_members.build
      end

      private

      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

21 entries across 21 versions & 1 rubygems

Version Path
solidus_backend-2.1.1 app/controllers/spree/admin/zones_controller.rb
solidus_backend-2.0.3 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.4.2 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.3.2 app/controllers/spree/admin/zones_controller.rb
solidus_backend-2.0.2 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.4.1 app/controllers/spree/admin/zones_controller.rb
solidus_backend-2.1.0 app/controllers/spree/admin/zones_controller.rb
solidus_backend-2.1.0.rc1 app/controllers/spree/admin/zones_controller.rb
solidus_backend-2.0.1 app/controllers/spree/admin/zones_controller.rb
solidus_backend-2.1.0.beta1 app/controllers/spree/admin/zones_controller.rb
solidus_backend-2.0.0 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.4.0 app/controllers/spree/admin/zones_controller.rb
solidus_backend-2.0.0.rc1 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.4.0.rc1 app/controllers/spree/admin/zones_controller.rb
solidus_backend-2.0.0.beta1 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.4.0.beta1 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.3.1 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.3.0 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.3.0.rc2 app/controllers/spree/admin/zones_controller.rb
solidus_backend-1.3.0.rc1 app/controllers/spree/admin/zones_controller.rb