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

@@ -88,18 +88,12 @@ class FavoriteGroup < ApplicationRecord
error += " Upgrade your account to create more."
end
self.errors.add(:base, error)
return false
else
return true
end
end
def validate_number_of_posts
if post_id_array.size > 10_000
self.errors.add(:base, "Favorite groups can have up to 10,000 posts each")
return false
else
return true
end
end