Skip to content

Commit

Permalink
fixed user methods
Browse files Browse the repository at this point in the history
  • Loading branch information
berk committed Aug 19, 2013
1 parent 1a43a98 commit c3784d9
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions test/dummy/app/models/user.rb
Expand Up @@ -59,15 +59,10 @@ def set_password(new_password)
save!
end

def password_set?
not password_set_at.nil?
end

def encrypt_password
if password.present?
self.salt = BCrypt::Engine.generate_salt
self.crypted_password = BCrypt::Engine.hash_secret(password, salt)
self.password_set_at = Time.now
end
end

Expand Down

0 comments on commit c3784d9

Please sign in to comment.