Class: Spree::Admin::InstallmentsController

Inherits:
ResourceController
  • Object
show all
Defined in:
app/controllers/spree/admin/installments_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



10
11
12
13
14
15
16
# File 'app/controllers/spree/admin/installments_controller.rb', line 10

def index
  @search = collection.ransack((params[:q] || {}).reverse_merge(s: 'created_at desc'))

  @installments = @search.result(distinct: true).
                  page(params[:page]).
                  per(params[:per_page] || Spree::Config[:orders_per_page])
end