Skip to content

Commit

Permalink
add auto login after signup
Browse files Browse the repository at this point in the history
  • Loading branch information
davemehrman committed Feb 26, 2012
1 parent f332875 commit b2f6a95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/users_controller.rb
Expand Up @@ -47,7 +47,8 @@ def create


respond_to do |format| respond_to do |format|
if @user.save 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 } format.json { render json: @user, status: :created, location: @user }
else else
format.html { render action: "new" } format.html { render action: "new" }
Expand Down

0 comments on commit b2f6a95

Please sign in to comment.