diff options
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r-- | activemodel/lib/active_model/secure_password.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb index 3eab745c89..dc89efd2d1 100644 --- a/activemodel/lib/active_model/secure_password.rb +++ b/activemodel/lib/active_model/secure_password.rb @@ -43,9 +43,9 @@ module ActiveModel if options.fetch(:validations, true) validates_confirmation_of :password validates_presence_of :password, :on => :create + + before_create { raise "Password digest missing on new record" if password_digest.blank? } end - - before_create { raise "Password digest missing on new record" if password_digest.blank? } include InstanceMethodsOnActivation |