Fix rubocop errors
This commit is contained in:
parent
c2f23fea6a
commit
3b68061e87
4 changed files with 8 additions and 16 deletions
|
@ -1,7 +1,5 @@
|
|||
class TrailingWhitespaceValidator < ActiveModel::EachValidator
|
||||
def validate_each(record, attribute, value)
|
||||
if value =~ /\s\z/
|
||||
record.errors[attribute] << (options[:message] || I18n.t("validations.trailing whitespace"))
|
||||
end
|
||||
record.errors[attribute] << (options[:message] || I18n.t("validations.trailing whitespace")) if value =~ /\s\z/
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue