]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/concerns/user_methods.rb
Rewrite changeset download show test
[rails.git] / app / controllers / concerns / user_methods.rb
index d79ed48d2ca742be14faad6db9f637b09dd247e4..447aea3fce3013ac2734992c4c8648ad612ce339 100644 (file)
@@ -59,8 +59,9 @@ module UserMethods
             # Ignore errors sending email
           end
         else
-          current_user.errors.add(:new_email, current_user.errors[:email])
-          current_user.errors.add(:email, [])
+          current_user.errors.delete(:email).each do |error|
+            current_user.errors.add(:new_email, error)
+          end
         end
 
         user.restore_email!