Created
March 25, 2011 14:07
-
-
Save zxiest/886882 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SessionsHelper | |
def deny_access | |
#store_location | |
notice = current_user.nil?? "Please sign in to access this page" : "You must sign in as an admin to access this page" | |
#flash[:error] = notice | |
logger.debug "here" | |
logger.debug notice | |
#flash[:notice] = notice | |
logger.debug flash[:notice] | |
redirect_to signin_path, :flash => { :notice => "test" } | |
#redirect_to signin_path, :notice => "test" | |
#redirect_to signin_path | |
end | |
end | |
class SessionsController < ApplicationController | |
def new | |
@title = "Sign in" | |
logger.debug "inside sessions controller new" | |
logger.debug flash[:notice] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment