Skip to content

Commit

Permalink
couchrestmodel password encryption now through 'after_validation'-cal…
Browse files Browse the repository at this point in the history
…lback. Now password can be changed without have to change other field.
  • Loading branch information
lenzcom committed Oct 21, 2012
1 parent 03ba1fc commit d811b5c
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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
Expand Down

0 comments on commit d811b5c

Please sign in to comment.