Skip to content
accelerando

Disable Ruby On Rails Sessions

Just a reminder to myself, but maybe it’s usefull for others as well.

Some days ago i stumpled upon the fact, that one can turn off session support in controllers in rails: HowtoChangeSessionOptions (see Disabling Sessions) or HowtoPerActionSessionOptions.

I found it particularly useful and convenient for my Feed controller, which is dedicated entirely to feed generation (yeah, i know about about REST and especially respond_to, but i wouldn’t get rid of thousands of useless sessions without an explicit controller:

class FeedsController < ApplicationController
  session :disabled => true
end

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*

*