Stores the requested page before signing in and redirect the user to the stored uri after.

This commit is contained in:
Carlos A. da Silva
2009-10-17 11:12:50 -03:00
parent abfb33a040
commit a5cb147eb2
8 changed files with 60 additions and 32 deletions

View File

@@ -11,7 +11,7 @@ class SessionsController < ApplicationController
def create
if sign_in(resource_name)
set_flash_message :success, :signed_in
redirect_to root_path
redirect_back_or_to root_path
else
unauthenticated!
render :new