• Could not connect to Twitter

New ShowMeDo: Dangers of Model in Session

“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.” – video here, Ryan Bates

Please share:
  • DZone
  • del.icio.us
  • Reddit
  • Furl
  • Ma.gnolia
  • email
  • StumbleUpon
  • Technorati
  • TwitThis
  • Slashdot
If you enjoyed this post, make sure you subscribe to my RSS feed!

Related posts:

  1. New ShowMeDo: Move Find into Model
  2. New ShowMeDo: Virtual Attributes
  3. New ShowMeDo – Rails: Caching with Instance Variables
  4. New ShowMeDo: Hackers Love Mass Assignment
  5. New ShowMeDo: Refactoring User Name Part 1

Comments are closed.