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
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---