From 8dd801d6cad9cb690f58746850ccf25139629909 Mon Sep 17 00:00:00 2001 From: Mike Gehard Date: Sat, 17 May 2014 18:01:11 -0600 Subject: [PATCH] Let others know why this code is here [ci skip] --- activemodel/lib/active_model/secure_password.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb index 826e89bf9d..0c3ed9e8ca 100644 --- a/activemodel/lib/active_model/secure_password.rb +++ b/activemodel/lib/active_model/secure_password.rb @@ -68,6 +68,7 @@ module ActiveModel validates_confirmation_of :password, if: ->{ password.present? } end + # This code is necessary as long as the protected_attributes gem is supported. if respond_to?(:attributes_protected_by_default) def self.attributes_protected_by_default #:nodoc: super + ['password_digest']