Rails Sessions - Disabling and Garbage Collection

Is there a way to turn sessions off in Rails? Doesn’t appear to be.

Also, is there any garbage collection for stale sessions?

On those two topics, are there any problems with Rails handling those
options?

I ask because it seems like something that would have been included.

If there is no technical reason why it wasn’t included, then I’ll
create/submit a source patch to add them.

Thanks

Bob S.

http://www.railtie.net/

Sessions are used for flash, so if you use flash then donÂ?t disable the
sessions.
You can set
::ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS = false
to dissable the sessions processing

Abuot the garbage collection topic, I have no idea

Rodrigo Domínguez
Consultor
Av. Directorio 183 1º Piso
Tel: 4921-1648 / 4926-1067
Cel: 15-5695-6027
mailto:[email protected] [email protected]
http://www.rorra.com.ar/ www.rorra.com.ar

-----Mensaje original-----
De: [email protected]
[mailto:[email protected]] En nombre de Bob S.
Enviado el: sábado, 28 de enero de 2006 14:50
Para: [email protected]
Asunto: [Rails] Rails Sessions - Disabling and Garbage Collection

Is there a way to turn sessions off in Rails? DoesnÂ?t appear to be.

Also, is there any garbage collection for stale sessions?

On those two topics, are there any problems with Rails handling those
options?
I ask because it seems like something that would have been included.
If there is no technical reason why it wasnÂ?t included, then IÂ?ll
create/submit a source patch to add them.

Thanks

Bob S.
http://www.railtie.net/

Is there a way to disable sessions on per Controller or
Controller/Action combination?

Seems a waste to use them for machine interfaces such
as web services and such cases where there’s no need
for a session.

And, if there isn’t, then I’ll submit a patch for that.


– Tom M.

Tom M. wrote:

Is there a way to disable sessions on per Controller or
Controller/Action combination?

Yes,

session :off
session :off, :only => %w(foo bar)

http://api.rubyonrails.com/classes/ActionController/SessionManagement/ClassMethods.html#M000080

Phil

Rockin’ Good!

:slight_smile:

Thanks.


– Tom M.

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