Created
March 28, 2010 15:00
-
-
Save floehopper/346794 to your computer and use it in GitHub Desktop.
This file contains 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
def activate | |
@user = User.find_using_perishable_token(params[:activation_code], 1.week) | |
if @user && @user.activate! | |
@user.deliver_activation_confirmation! | |
flash[:notice] = 'Your username has been entered in the form below. Simply click Login to enter your account!' | |
redirect_to login_url(:email => @user.email) | |
else | |
flash[:notice] = 'Either you activated it already Or that was an old request' | |
redirect_to login_url | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment