mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #15154 from msgehard/move_password_field
Put attr_reader in with all of the other instance methods
This commit is contained in:
commit
5508a3e5ca
1 changed files with 2 additions and 2 deletions
|
@ -52,8 +52,6 @@ module ActiveModel
|
||||||
raise
|
raise
|
||||||
end
|
end
|
||||||
|
|
||||||
attr_reader :password
|
|
||||||
|
|
||||||
include InstanceMethodsOnActivation
|
include InstanceMethodsOnActivation
|
||||||
|
|
||||||
if options.fetch(:validations, true)
|
if options.fetch(:validations, true)
|
||||||
|
@ -92,6 +90,8 @@ module ActiveModel
|
||||||
BCrypt::Password.new(password_digest) == unencrypted_password && self
|
BCrypt::Password.new(password_digest) == unencrypted_password && self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
attr_reader :password
|
||||||
|
|
||||||
# Encrypts the password into the +password_digest+ attribute, only if the
|
# Encrypts the password into the +password_digest+ attribute, only if the
|
||||||
# new password is not blank.
|
# new password is not blank.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue