mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Declaring the attr_accessor for password_confirmation is not necessary
as the confirmation validation already adds that attr_accessor
This commit is contained in:
committed by
David Heinemeier Hansson
parent
7660e7cb4d
commit
a8365ab9ad
@@ -31,11 +31,10 @@ module ActiveModel
|
||||
# User.find_by_name("david").try(:authenticate, "mUc3m00RsqyRe") # => user
|
||||
def has_secure_password
|
||||
attr_reader :password
|
||||
attr_accessor :password_confirmation
|
||||
|
||||
validates_confirmation_of :password
|
||||
validates_presence_of :password_digest
|
||||
|
||||
|
||||
include InstanceMethodsOnActivation
|
||||
|
||||
if respond_to?(:attributes_protected_by_default)
|
||||
|
||||
Reference in New Issue
Block a user