Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3: Disable session cookies

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 at the browser, I can see 'Cookie xxx changed" message in firebug. I would like to disable or bypass session cookies for this controller.

I read somewhere that using

session :off

would do the job, but I see it is deprecated. Is there any work around?

Thanks!

like image 286
webtu Avatar asked Oct 23 '10 11:10

webtu


1 Answers

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.

like image 66
stve Avatar answered Sep 23 '22 22:09

stve