logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

subscriptions_controller.rb (394B)


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