session :no_cookies => true, :except => [ :login ]

#rails #ruby

Do all those new web2.0ish sites need to throw cookies at the casual viewer just on the first page? Isn’t there a short and sweet way to stop rails from throwing cookies like there is nothing to them? Ok, that’s not a question. Rails always delivers!

Option Switch Helper for Rails

#rails #ruby #snippet #development #helper

There are always some options for your page. Perhaps the number of items to display (articles, picture, projects, …). Or the sort key for those. Preferably you set some sane defaults. But you’d like to enable your visitors to change those?