A fellow asked me how he could store information per-user in Rack. This was my (brief) response:


Generally with the cookies object. Specifically, Rack has a “session”, which encodes a session identity into the cookies object, usually with some or all of your data.

You can also map from the session ID to data on the server side, with what Rails calls a “session store”. Rack comes with a few session stores (cookies, MemCache, pool) and Rails comes with more. Here are some useful links:

Free Email Rails Class? Free Chapters? News?

* indicates required
You'll hear about Ruby on Rails internals, database migrations and whatever Rails programmers can benefit from.

Comments