Permalink
Browse files

Declaring the attr_accessor for password_confirmation is not necessary

as the confirmation validation already adds that attr_accessor
  • Loading branch information...
1 parent 7660e7c commit a8365ab9ad57efc40ecd951aca904ff3a75937fd @bcardarella bcardarella committed with dhh Apr 11, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 activemodel/lib/active_model/secure_password.rb
@@ -31,11 +31,10 @@ module ClassMethods
# 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)

0 comments on commit a8365ab

Please sign in to comment.