Sha256: 604248d77c3583cd36799fe18ad1d856019bf9fce970c97689471e3e101673cc
Contents?: true
Size: 750 Bytes
Versions: 20
Compression:
Stored size: 750 Bytes
Contents
class Muck::ActivationsController < ApplicationController unloadable ssl_required :new before_filter :not_logged_in_required, :only => [:new] def new @user = User.find_using_perishable_token(params[:id]) if @user.blank? flash[:notice] = t('muck.users.activation_not_found') redirect_to new_user_path and return end if @user.active? flash[:notice] = t('muck.users.already_activated') redirect_to login_path and return end if @user.activate! UserSession.create(@user) flash[:notice] = t('muck.users.account_activated') @user.deliver_activation_confirmation! redirect_to welcome_user_path(@user) else render :action => :new end end end
Version data entries
20 entries across 20 versions & 1 rubygems