闭社主体 forked from https://github.com/tootsuite/mastodon
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.

21 lines
378 B

  1. # frozen_string_literal: true
  2. module RemoteAccountControllerConcern
  3. extend ActiveSupport::Concern
  4. included do
  5. layout 'public'
  6. before_action :set_account
  7. before_action :check_account_suspension
  8. end
  9. private
  10. def set_account
  11. @account = Account.find_remote!(params[:acct])
  12. end
  13. def check_account_suspension
  14. gone if @account.suspended?
  15. end
  16. end