Fix all rubocop warnings
This commit is contained in:
parent
05e39dc619
commit
bf851133ae
48 changed files with 124 additions and 97 deletions
|
@ -21,8 +21,8 @@ class ExistingUsernameValidator < ActiveModel::EachValidator
|
|||
|
||||
if options[:multiple]
|
||||
record.errors.add(attribute, I18n.t('existing_username_validator.not_found_multiple', usernames: usernames_with_no_accounts.join(', '))) if usernames_with_no_accounts.any?
|
||||
else
|
||||
record.errors.add(attribute, I18n.t('existing_username_validator.not_found')) if usernames_with_no_accounts.any? || usernames_and_domains.size > 1
|
||||
elsif usernames_with_no_accounts.any? || usernames_and_domains.size > 1
|
||||
record.errors.add(attribute, I18n.t('existing_username_validator.not_found'))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -53,7 +53,7 @@ class StatusLengthValidator < ActiveModel::Validator
|
|||
entity[:indices].last
|
||||
end
|
||||
|
||||
result << str[last_index..-1]
|
||||
result << str[last_index..]
|
||||
result
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue