How Can I switch the session storage according to the client on Ruby on Rails 2.3.5
Posted
by mojalin
on Stack Overflow
See other posts from Stack Overflow
or by mojalin
Published on 2010-03-12T07:55:31Z
Indexed on
2010/03/12
7:57 UTC
Read the original article
Hit count: 280
Hi! I have a question about sessions on ruby-on-rails. We have a several options about session storage such as cookie, active_record_store, etc.. I primarily use the cookie storage, but, there are some client which doesn't support cookie function. In that case, I have to make that client to use the "active_record_store". My rails version is 2.3.5. I found out that even though I use the active_record_store, the cookie is still available. In my situation, both session storage might be available. So, I want to make the framework to primarily use the cookie, when the cookie is available. On the other hand, the client doesn't support the cookie, secondly to use the active_record_store.
I think this function requires some override to the framework, but I don't know how to do it. Do you have any idea for that? Thank you very much in advance.
© Stack Overflow or respective owner