I have a toy rails app, 2.3.5 on Debian ''squeeze'', that uses the ActiveRecord session store. I can see that it set cookies and inserts rows into the database table ''sessions''. Inside a controller, how do I acquire a reference to the model object representing the current session? This used to be possible by calling ''session.model'' but in 2.3.5 there is no ''model'' method on the session object. Thanks -- Nick -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Let me know if you figure this out - I''m having the same problem. -- Garth -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 2010-06-16 08:56, Garth wrote:> Let me know if you figure this out - I''m having the same problem.session[:fish] = ! session[:fish] @site_session = request.env[''rack.session.record''] The fishy line, or equivalent, seems to be required to ensure that Rails creates a session object. I don''t know that this is the best way to get the session model object. It''s pretty deranged compared to ''... = session.model''.> -- Garth-- Nick -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.