followers_controller.rb 371 B

123456789101112131415161718
  1. # frozen_string_literal: true
  2. module Admin
  3. class FollowersController < BaseController
  4. before_action :set_account
  5. PER_PAGE = 40
  6. def index
  7. authorize :account, :index?
  8. @followers = @account.followers.local.recent.page(params[:page]).per(PER_PAGE)
  9. end
  10. def set_account
  11. @account = Account.find(params[:account_id])
  12. end
  13. end
  14. end