RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: robmc
This took me a while to figure out as well. You want to add the session line to your users controller and point it wherever you are taking your users once they log in.
@user = User.new(params[:user])
session[:user_id] = @user.id
redirect_to some_path, :notice => "Signed up!"
I tried to add the cookie line because I would like to automatically log in after signup as well but I am getting the error:
NoMethodError in UsersController#create
undefined method `auth_token' for #< User:0x9a89d60 >
Am I missing something?