Sha256: 930bddd1aee3b5271a87dce36124de59f5065537f3f6c78f24efe45be5fbe180

Contents?: true

Size: 581 Bytes

Versions: 76

Compression:

Stored size: 581 Bytes

Contents

module Spree
  module Admin
    class PropertiesController < ResourceController
      def index
        respond_with(@collection)
      end

      private

      def collection
        return @collection if @collection.present?

        # params[:q] can be blank upon pagination
        params[:q] = {} if params[:q].blank?

        @collection = super
        @search = @collection.ransack(params[:q])
        @collection = @search.result.
                      page(params[:page]).
                      per(Spree::Config[:admin_properties_per_page])
      end
    end
  end
end

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
spree_backend-4.0.9 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.1.15 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.2.7 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.3.3 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.2.6 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.3.2 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.3.1 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.3.0 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.3.0.rc3 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.3.0.rc2 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.3.0.rc1 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.2.5 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.1.14 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.0.8 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.2.4 app/controllers/spree/admin/properties_controller.rb
spree_backend-3.7.14.1 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.2.3.1 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.1.13.1 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.0.7.1 app/controllers/spree/admin/properties_controller.rb
spree_backend-4.2.3 app/controllers/spree/admin/properties_controller.rb