Disable Ruby On Rails Sessions

November 20, 2007 by Michael

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

No comments yet

Post a Comment

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