# Help with page redirect

**URL:** <https://www.ruby-forum.com/t/help-with-page-redirect/126516>\
**Category:** Ruby\
**Created:** [January 18, 2008, 10:25pm UTC](https://www.ruby-forum.com/t/help-with-page-redirect/126516 "2008-01-18T22:25:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![woodzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/f08c70/32.png) [@woodzer](https://www.ruby-forum.com/u/woodzer)\
**Post date:** [January 18, 2008, 10:25pm UTC](https://www.ruby-forum.com/t/help-with-page-redirect/126516/1 "2008-01-18T22:25:20Z")

</div>

Today I learned how to write and read cookies in eruby but I’m looking  
for a better way “ruby way” of doing something.

I read to see if the user has my cookie. If they have read the page  
already and allowed a cookie I want to send them automatically to  
another page.

This is what I have:

\<% if cookie == ‘true’ %\>

\<%else%\> I put in my content \<%end%\>

Surely there is a better ruby way than using a meta tag?

Thanks in advance,  
Peter

---

<div class="post-metadata">

**Author:** ![woodzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/f08c70/32.png) [@woodzer](https://www.ruby-forum.com/u/woodzer)\
**Post date:** [January 21, 2008, 6:18pm UTC](https://www.ruby-forum.com/t/help-with-page-redirect/126516/2 "2008-01-21T18:18:40Z")

</div>

bump
