projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4df87c
)
Replace deprecated ActiveModel::Errors get/set methods
author
Tom Hughes
<tom@compton.nu>
Mon, 5 Jun 2017 21:31:13 +0000
(22:31 +0100)
committer
Tom Hughes
<tom@compton.nu>
Mon, 5 Jun 2017 21:41:23 +0000
(22:41 +0100)
app/controllers/user_controller.rb
patch
|
blob
|
history
diff --git
a/app/controllers/user_controller.rb
b/app/controllers/user_controller.rb
index 6b50798313db59b7196e8466348bc99ae07f562d..b6fc79b25151db50f9f935699b21c7efc6d839c9 100644
(file)
--- a/
app/controllers/user_controller.rb
+++ b/
app/controllers/user_controller.rb
@@
-725,8
+725,8
@@
class UserController < ApplicationController
# Ignore errors sending email
end
else
- @user.errors.
set(:new_email, @user.errors.get(:email)
)
- @user.errors.
set
(:email, [])
+ @user.errors.
add(:new_email, @user.errors[:email]
)
+ @user.errors.
add
(:email, [])
end
user.restore_email!