EPISODE · Apr 2, 2007 · 5 MIN
#13 Dangers of Model in Session
from RailsCasts (Mobile) · host Ryan Bates
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.
What this episode covers
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.
NOW PLAYING
#13 Dangers of Model in Session
No transcript for this episode yet
Similar Episodes
Mar 2, 2026 ·27m
Mar 2, 2026 ·8m
Feb 25, 2026 ·14m
Jan 14, 2026 ·32m
Dec 16, 2025 ·43m