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 |
Share This
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...
— Trackback URI
This entry (permalink) was posted on Tuesday, November 20, 2007, at 2:19 pm by Michael, tagged with Rails, Tipps and categorized in Rails.
The following post could be of some interest: Rails Links, Different day, same shit: MySQL Gem again, Logging in Rails outside a controller, PDF::Writer and Ruby on Rails 2.1, Ruby on Rails vs. J2EE, Ruby on Rails Auto complete, PDF::Writer and Ruby on Rails 2.2.2, Don’t make that sad smilie cry even more, Rails and Grails revisited, How to change the image assets path in Rails
Post a Comment