summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-04-01 15:41:07 +0000
committerGo MAEDA <maeda@farend.jp>2021-04-01 15:41:07 +0000
commit357fa10bbd0f75ba75236367d91a4cbfc99dd5bc (patch)
treea23b93f882aefa3cfef3371a3703a7b15deb9b53 /lib
parentec989a54201564bfd88cacb2359ad1288dad0e20 (diff)
downloadredmine-357fa10bbd0f75ba75236367d91a4cbfc99dd5bc.tar.gz
redmine-357fa10bbd0f75ba75236367d91a4cbfc99dd5bc.zip
Fix "DEPRECATION WARNING: Calling '<<' to an ActiveModel::Errors message array in order to add an error is deprecated." (#29914, #34985).
git-svn-id: http://svn.redmine.org/redmine/trunk@20898 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/sudo_mode.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/sudo_mode.rb b/lib/redmine/sudo_mode.rb
index ca15705d6..9703f0c77 100644
--- a/lib/redmine/sudo_mode.rb
+++ b/lib/redmine/sudo_mode.rb
@@ -20,7 +20,7 @@ module Redmine
def check_password
unless password.present? && User.current.check_password?(password)
- errors[:password] << :invalid
+ errors.add(:password, :invalid)
end
end
end