i am often seeing this error in my exception notification inbox. What is happening andd why is the user not seeing a nice flash error notification?
A NameError occurred in users#new:
undefined local variable or method `store_referer' for #<UsersController:0xb69d33
respond_to do |format|
#Put your domain name here ex. http://www.example.com
domain_name = "http://www.ndthub.com"
http_referer = session[:refer_to]
http_referer = ( session[:refer_to] || domain_name )
flash[:error] = "You don't have permission to complete that action."
#The [0..20] represents the 21 characters in http://localhost:3000
#You have to set that to the number of characters in your domain name
if http_referer[0..20] != domain_name
session[:refer_to] = nil
headers["Status"] = "Unauthorized"
headers["WWW-Authenticate"] = %(Basic realm="Web Password")
render :text => "You don't have permission to complete this action.", :status => '401 Unauthorized'