validations: drop superfluous return statements.
Returning true or false in a validation callback doesn't do anything, so drop these superfluous return statements.
This commit is contained in:
@@ -214,9 +214,6 @@ class Dmail < ApplicationRecord
|
||||
def validate_sender_is_not_banned
|
||||
if from.try(:is_banned?)
|
||||
errors[:base] << "Sender is banned and cannot send messages"
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user