Nitobi
About Nitobi
Services
Products
Home -> Blogs -> Brian@Nitobi

Brian@Nitobi

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.


Search Posts

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

Pages

Archives

Categories

All contents are (c) Copyright 2006, Nitobi Software Inc. All rights Reserved
Brian@Nitobi Entries (RSS) and Comments (RSS).