Method: UsersController#activate
- Defined in:
- app/controllers/users_controller.rb
#activate ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 |
# File 'app/controllers/users_controller.rb', line 49 def activate @user = User.find_using_perishable_token(params[:activation_code], 1.week) || (raise Exception) if @user.activate! @user.deliver_activation_confirmation! flash[:notice] = "Your account has been activated." UserSession.create(@user) redirect_to root_path else render :action => :new end end |