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:
evazion
2019-08-04 15:45:05 -05:00
parent a926b162be
commit 9163b3cb1c
16 changed files with 6 additions and 62 deletions

View File

@@ -100,21 +100,14 @@ class UserFeedback < ApplicationRecord
def creator_is_gold
if !creator.is_gold?
errors[:creator] << "must be gold"
return false
elsif creator.no_feedback?
errors[:creator] << "cannot submit feedback"
return false
else
return true
end
end
def user_is_not_creator
if user_id == creator_id
errors[:creator] << "cannot submit feedback for yourself"
return false
else
return true
end
end