Sha256: 38c6b34dbc258dff0ae1887deaf6e1d11f00fb79ed4b790dc330c627d17a8181

Contents?: true

Size: 570 Bytes

Versions: 17

Compression:

Stored size: 570 Bytes

Contents

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

      private

      def collection
        return @collection if @collection
        # 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[:properties_per_page])

        @collection
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
solidus_backend-2.5.2 app/controllers/spree/admin/properties_controller.rb
solidus_backend-2.5.1 app/controllers/spree/admin/properties_controller.rb
solidus_backend-2.5.0 app/controllers/spree/admin/properties_controller.rb
solidus_backend-2.5.0.rc1 app/controllers/spree/admin/properties_controller.rb
solidus_backend-2.5.0.beta2 app/controllers/spree/admin/properties_controller.rb
solidus_backend-2.5.0.beta1 app/controllers/spree/admin/properties_controller.rb
solidus_backend-2.4.2 app/controllers/spree/admin/properties_controller.rb
solidus_backend-2.4.1 app/controllers/spree/admin/properties_controller.rb
solidus_backend-2.3.1 app/controllers/spree/admin/properties_controller.rb
solidus_backend-2.4.0 app/controllers/spree/admin/properties_controller.rb
solidus_backend-2.4.0.rc1 app/controllers/spree/admin/properties_controller.rb
solidus_backend-2.4.0.beta1 app/controllers/spree/admin/properties_controller.rb
solidus_backend-2.3.0 app/controllers/spree/admin/properties_controller.rb
solidus_backend-2.3.0.rc3 app/controllers/spree/admin/properties_controller.rb
solidus_backend-2.3.0.rc2 app/controllers/spree/admin/properties_controller.rb
solidus_backend-2.3.0.rc1 app/controllers/spree/admin/properties_controller.rb
solidus_backend-2.3.0.beta1 app/controllers/spree/admin/properties_controller.rb