aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorBrian Cardarella <bcardarella@gmail.com>2011-04-11 12:18:12 +0800
committerDavid Heinemeier Hansson <david@loudthinking.com>2011-04-14 16:43:51 +0800
commita8365ab9ad57efc40ecd951aca904ff3a75937fd (patch)
treee1c94a059603a62d041921e07f9d9ce5e15fdda4 /activemodel
parent7660e7cb4df69ad127661ad87f495a3b212170b9 (diff)
downloadrails-a8365ab9ad57efc40ecd951aca904ff3a75937fd.tar.gz
rails-a8365ab9ad57efc40ecd951aca904ff3a75937fd.tar.bz2
rails-a8365ab9ad57efc40ecd951aca904ff3a75937fd.zip
Declaring the attr_accessor for password_confirmation is not necessary
as the confirmation validation already adds that attr_accessor
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/secure_password.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb
index 957d0ddaaa..d6f0456698 100644
--- a/activemodel/lib/active_model/secure_password.rb
+++ b/activemodel/lib/active_model/secure_password.rb
@@ -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)