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

@@ -117,8 +117,7 @@ class User < ApplicationRecord
module BanMethods
def validate_ip_addr_is_not_banned
if IpBan.is_banned?(CurrentUser.ip_addr)
self.errors[:base] << "IP address is banned"
return false
errors[:base] << "IP address is banned"
end
end
@@ -407,8 +406,6 @@ class User < ApplicationRecord
if per_page.nil? || !is_gold?
self.per_page = Danbooru.config.posts_per_page
end
return true
end
def level_class