NoamB/sorcery — Issue #139: Login after sign up
Author: Fodoj
Created: 2011-11-03 19:11:43+00:00
State: open

How do I login right after sign up? Tried this:

def create
@user = User.new(params[:user])
if @user.save
user = login(@user.email, @user.password, remember_me=false)
if user
redirect_to dashboard_path, :notice => "You are registered now!"
end
else
render :new
end
end

Failed.