From 41f7d07da3de09862f6308889a43f2f894320c0e Mon Sep 17 00:00:00 2001 From: Mike Gehard Date: Sat, 17 May 2014 13:45:35 -0600 Subject: Put attr_reader in with all of the other instance methods This makes the grouping make a little more sense --- activemodel/lib/active_model/secure_password.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activemodel') diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb index 826e89bf9d..76beaad9f5 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) @@ -91,6 +89,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. # -- cgit v1.2.3