RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: davidtolsma
@IanWhalen
automatically login after signup. Add the cookies line in the save condition.
def create @user = User.new(params[:user]) if @user.save redirect_to root_url, :notice => "Signed up!" cookies[:auth_token] = @user.auth_token else flash[:notice] = "User exists." redirect_to sign_in_path end end
@IanWhalen
automatically login after signup. Add the cookies line in the save condition.