Showing 3 videos tagged with session

Railscast - Episode 13: Dangers of Model in Session

00:05:17 railscasts.com
Be careful when storing a model in a session. It will behave differently than you expect and can easily get out of sync with the database. Instead of storing the model directly in the session, store the id to the model and use that to fetch it from the database.

Railscast - Episode 84: Cookie Based Session Store

00:04:00 railscasts.com
In Rails 1.2 the default session store is file based. This is inefficient and difficult to maintain. In Rails 2.0 the default is now cookie based which has several benefits as you will see in this episode.

Railscast - Episode 119: Session Based Model

00:13:26 railscasts.com
If you have a lot of logic associated with the data inside a session, you'll need some central location to put this logic. See how to create a session based model in this episode.