diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2017-05-18 21:11:23 -0400 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-19 03:11:23 +0200 |
commit | 6e4c7d62118d5d1f2e966950edfdbc80cebd4d7c (patch) | |
tree | 886a8215d03ab975211a463bd33aee1331cc7bb9 /app/controllers | |
parent | d2542dcec0dafa8878efd2bd4fe53bd80256aa60 (diff) |
Conditional validations no longer accept strings for if/unless (#3124)
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/remote_follow_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/remote_follow_controller.rb b/app/controllers/remote_follow_controller.rb index 625ce1488..2988231b1 100644 --- a/app/controllers/remote_follow_controller.rb +++ b/app/controllers/remote_follow_controller.rb @@ -4,7 +4,7 @@ class RemoteFollowController < ApplicationController layout 'public' before_action :set_account - before_action :gone, if: -> { @account.suspended? } + before_action :gone, if: :suspended_account? def new @remote_follow = RemoteFollow.new(session_params) @@ -34,4 +34,8 @@ class RemoteFollowController < ApplicationController def set_account @account = Account.find_local!(params[:account_username]) end + + def suspended_account? + @account.suspended? + end end |