Hi
Sorry for this newb question but I’m stumped and need a point in the
right direction.
Basically I want visitors to go to /home and not /public. If they have
never been to the site I want to redirect them to /public for a welcome
page. I have part of this working. The problem I’m having is setting the
/home as the default for users that have the cookie.
In my home controller I have:
before_filter :check_redirect
def index
end
def check_redirect
if cookies[:viewed]
true
else
cookies[:viewed] = { :value => “1”, :expires => 1.year.from_now }
redirect_to “/index.html”
false
end
end
Thanks in advance,
Peter