Class: Spree::Admin::SubscriptionEventsController

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

Instance Method Summary collapse

Instance Method Details

#indexObject



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

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

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