views:

29

answers:

1

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.

A: 

If your client can't stock cookie, you can't have a session_store. Even in active_record.

The session system know which session you have with save session_id in cookie. So if your client refuse cookie. You can't have session system.

But your can hack a little to make a system where the cookie store is pass in URL params.

shingara