I created a controller to serve dynamic stylesheets, so I can use the image_tag helper and add some cache control.
The problem is that every time the css file is loaded
Simply done by setting the session_store
to :disabled
like so:
MyApp::Application.config.session_store :disabled
That will completely disable the session as well as access to the flash
.
Here's an alternate way in 2.3 to disable sessions, by setting the session store to nil:
http://johnpwood.net/2009/09/04/disabling-sessions-in-rails-2-3-4/
Perhaps you can do the same in 3?
or one can use session :off
anyways (even in Rails 3) :
https://github.com/kares/session_off
class StylesheetsController < ActionController::Base
session :off # for all actions in this controller
end
In Rails 3 you could use ActiveControllerMetal and only include the features you need http://asciicasts.com/episodes/150-rails-metal