Nuno L.
2012-Jun-04 13:35 UTC
How to save the user_id in a separate column when using ActiveRecord::SessionStore?
Hi! I''m converting my Rails 3.1 app from cookie sessions to database sessions. I''ve added an extra column on the sessions table to save the user_id. I read the documentation in http://apidock.com/rails/v3.1.0/ActiveRecord/SessionStore and googled but can''t seem to find a way to set the session''s user_id that works. Can someone help? Thanks -- Posted via http://www.ruby-forum.com/. -- 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.
Nuno L.
2012-Jun-04 17:43 UTC
Re: How to save the user_id in a separate column when using ActiveRecord::SessionStore?
As a work around I''m now saving user_id and session_id''s in a separate table. I couln''t find a way to write to the sessions table! -- Posted via http://www.ruby-forum.com/. -- 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.