Skip to content

Instantly share code, notes, and snippets.

@zxiest
Created March 25, 2011 14:07
Show Gist options
  • Save zxiest/886882 to your computer and use it in GitHub Desktop.
Save zxiest/886882 to your computer and use it in GitHub Desktop.
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