I am trying to write a simple function that checks if a user is logged
in based on a cookie value.
if cookies[:userid] != ""
isLoggedIn = true
isLoggedIn = false
however, when I call this function from my application-wide view, I get
the following error:
undefined local variable or method `cookies' for
Can anyone help me understand how I can access my cookies from anywhere
other than an action in a controller?