aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenare Degan <henare.degan@gmail.com>2012-12-12 13:59:01 +1100
committerHenare Degan <henare.degan@gmail.com>2012-12-12 15:28:14 +1100
commit2207e3ccdec62e634189f811193fb605c4750b82 (patch)
treee89eb0ce3c9fd464437990d451eb46457843b386
parentb8634f8d7caa13d44a0beec2978b270964714dab (diff)
Errors#add_to_base(msg) has been deprecated, use Errors#add(:base, msg) instead
-rw-r--r--app/models/user.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index a2815063d..490587c39 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -133,14 +133,14 @@ class User < ActiveRecord::Base
if user
# There is user with email, check password
if !user.has_this_password?(params[:password])
- user.errors.add_to_base(auth_fail_message)
+ user.errors.add(:base, auth_fail_message)
end
else
# No user of same email, make one (that we don't save in the database)
# for the forms code to use.
user = User.new(params)
# deliberately same message as above so as not to leak whether registered
- user.errors.add_to_base(auth_fail_message)
+ user.errors.add(:base, auth_fail_message)
end
user
end