From 6e4c7d62118d5d1f2e966950edfdbc80cebd4d7c Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 18 May 2017 21:11:23 -0400 Subject: Conditional validations no longer accept strings for if/unless (#3124) --- app/controllers/remote_follow_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/controllers/remote_follow_controller.rb') 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 -- cgit