How exactly do i redirect a user if they’re not logged in?
I have a cookie being written to the @session variable on login and I
can pull info from it. For instance “@session[‘user’].login” pulls their
username just fine. But if they type in the url of the “welcome” page
without logging in I get “You have a nil object when you didn’t expect
it!” which I would expect.
Instead of this nasty error message, how would I redirect them to the
login page?