0
0
Fork 0

Fix Rails/DeprecatedActiveModelErrorsMethods cop (#24742)

This commit is contained in:
Matt Jankowski 2023-05-02 12:39:22 -04:00 committed by GitHub
parent b5c4b47746
commit 24491abf6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 12 deletions

View file

@ -121,10 +121,10 @@ module Mastodon
say('OK', :green)
say("New password: #{password}")
else
user.errors.to_h.each do |key, error|
user.errors.each do |error|
say('Failure/Error: ', :red)
say(key)
say(" #{error}", :red)
say(error.attribute)
say(" #{error.type}", :red)
end
exit(1)
@ -197,10 +197,10 @@ module Mastodon
say('OK', :green)
say("New password: #{password}") if options[:reset_password]
else
user.errors.to_h.each do |key, error|
user.errors.each do |error|
say('Failure/Error: ', :red)
say(key)
say(" #{error}", :red)
say(error.attribute)
say(" #{error.type}", :red)
end
exit(1)