Permalink
Browse files

couchrestmodel password encryption now through 'after_validation'-cal…

…lback. Now password can be changed without have to change other field.
  • Loading branch information...
1 parent 03ba1fc commit d811b5c20ed2eeae9c9df7aea331e7020ffc7779 @lenzcom lenzcom committed Oct 21, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 padrino-admin/lib/padrino-admin/generators/templates/account/couchrest.rb.tt
@@ -22,7 +22,7 @@ class <%= @model_name %> < CouchRest::Model::Base
validate :unique_email_validator
# Callbacks
- before_save :encrypt_password, :if => :password_required
+ after_validation :encrypt_password, :if => :password_required
##
# This method is for authentication purpose

0 comments on commit d811b5c

Please sign in to comment.