Permalink
Browse files

add auto login after signup

  • Loading branch information...
1 parent f332875 commit b2f6a959188ba3d7cbab82c308872c3403b12d72 @davemehrman committed Feb 26, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 app/controllers/users_controller.rb
@@ -47,7 +47,8 @@ def create
respond_to do |format|
if @user.save
- format.html { redirect_to @user, notice: 'User was successfully created.' }
+ session[:uid] = @user.id
+ format.html { redirect_to spots_url, notice: 'User was successfully created.' }
format.json { render json: @user, status: :created, location: @user }
else
format.html { render action: "new" }

0 comments on commit b2f6a95

Please sign in to comment.