You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
355 B

  1. # frozen_string_literal: true
  2. module Admin
  3. class SubscriptionsController < BaseController
  4. def index
  5. @subscriptions = ordered_subscriptions.page(requested_page)
  6. end
  7. private
  8. def ordered_subscriptions
  9. Subscription.order(id: :desc).includes(:account)
  10. end
  11. def requested_page
  12. params[:page].to_i
  13. end
  14. end
  15. end