aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/secure_password.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-20 20:24:51 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-20 20:24:51 -0300
commit5508a3e5ca05d4c43232868f40ebd726d251eeac (patch)
treec78f6ec5232d83c7d62b82f8e799a1a51cbafca1 /activemodel/lib/active_model/secure_password.rb
parent089d9baa3348277c08a0877de785cb8fc14791aa (diff)
parent41f7d07da3de09862f6308889a43f2f894320c0e (diff)
downloadrails-5508a3e5ca05d4c43232868f40ebd726d251eeac.tar.gz
rails-5508a3e5ca05d4c43232868f40ebd726d251eeac.tar.bz2
rails-5508a3e5ca05d4c43232868f40ebd726d251eeac.zip
Merge pull request #15154 from msgehard/move_password_field
Put attr_reader in with all of the other instance methods
Diffstat (limited to 'activemodel/lib/active_model/secure_password.rb')
-rw-r--r--activemodel/lib/active_model/secure_password.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb
index 0c3ed9e8ca..4033eb5808 100644
--- a/activemodel/lib/active_model/secure_password.rb
+++ b/activemodel/lib/active_model/secure_password.rb
@@ -52,8 +52,6 @@ module ActiveModel
raise
end
- attr_reader :password
-
include InstanceMethodsOnActivation
if options.fetch(:validations, true)
@@ -92,6 +90,8 @@ module ActiveModel
BCrypt::Password.new(password_digest) == unencrypted_password && self
end
+ attr_reader :password
+
# Encrypts the password into the +password_digest+ attribute, only if the
# new password is not blank.
#