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

@@ -141,10 +141,8 @@ class BulkUpdateRequest < ApplicationRecord
module ValidationMethods
def script_formatted_correctly
AliasAndImplicationImporter.tokenize(script)
return true
rescue StandardError => e
errors[:base] << e.message
return false
end
def forum_topic_id_not_invalid
@@ -157,11 +155,8 @@ class BulkUpdateRequest < ApplicationRecord
begin
AliasAndImplicationImporter.new(script, forum_topic_id, "1", skip_secondary_validations).validate!
rescue RuntimeError => e
self.errors[:base] << e.message
return false
errors[:base] << e.message
end
errors.empty?
end
end