Forum: Ruby on Rails Session management changed in EdgeRails?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Matthew I. (Guest)
on 2006-03-10 02:54
Hi,

I've been developing an application in Rails 1.0 and finally made the
switch to Edge for has_many :through and polymorphism. I'm currently
storing the authenticated user object (User model) in the session. This
has worked well up until upgrading to EdgeRails. What I do is set @user
= session[:user] in my controllers and then access the various @user
associations such as @user.posts. In 1.0, the session data would
remained unchanged unless I explicitlt made change to a @user property,
but in Edge, every association I reference is copied into the session
and becomes dissociated from the database. For example,
@user.posts.delete(post) only removes the post from the session. If i
delete it from teh database directly, I have to reload the user object.

Are there any new session options that I can change to prevent rails
from copying associations to the session in the first place? I really
don't want to have to worry about the session becoming stale and/or
dissociated from the database.

-matthew
This topic is locked and can not be replied to.