Class: Spree::Admin::SubscriptionOrdersController

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

Instance Method Summary collapse

Instance Method Details

#indexObject



8
9
10
11
12
13
14
# File 'app/controllers/spree/admin/subscription_orders_controller.rb', line 8

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

  @subscription_orders = @search.result(distinct: true).
                         page(params[:page]).
                         per(params[:per_page] || 20)
end