Memcached session storage not work for activerecord object?

I use memcached to store session.
It works great if store string in session, but not work if I store
activerecord object.

for example,

[view1]
<% session[:k] = “test” %>
<% session[:o] = User.find(1) %>

[view2]
<%= session[:k] %> # test
<%= session[:o] %> # nil

I expect session[:o] will be object query from User.find(1), but it’s
nil.
any idea ?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs