Conditional validations no longer accept strings for if/unless (#3124)
This commit is contained in:
parent
d2542dcec0
commit
6e4c7d6211
6 changed files with 13 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue