Hi, if you update a session variable, you’re not updating the database
as well. Thus, in your example, you’re simply modifying the
object’s field, first_name, stored in session.
The object stored in the session is just a reference to the in-memory
User object, it will not
reflect changes to the database. Conventional RoR wisdom dictates
that you should not
store full objects in the session at all, but rather the id of the
object which can then be used to
lookup the object in the database as necessary.