Created
December 10, 2014 19:58
-
-
Save jtrim/1e965728892b79de2de7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Activation < Struct.new(:user, :activation_token) | |
| def activate | |
| if user.activation_token == hash_token(activation_token) | |
| user.update_attributes!({ | |
| activated_at: Time.now, | |
| locked_at: nil, | |
| activation_token: nil | |
| }) | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment