Skip to Navigation | Skip to Content



Archive for June, 2007

Rails Cookie Gotchas | June 19th, 2007

Rails breaks the hash implementation that cookies appear, on the surface, to support.

For whatever reason, symbol access of values doesn’t work but string access does. Also, for whatever reason, the nil? method will not work but the empty? method does. Hopefully this saves somebody some frustration!


request.cookies['note'].value unless request.cookies['note'].empty?

Cookies, yum.

Posted in Uncategorized | 1 Comment » | Add to Delicious | Digg It


Search Posts

You are currently browsing the Brian@Nitobi weblog archives for June, 2007.

Archives

Categories