Wtf?!?!? Rails committers getting sloppy!

2009 July 22
by scottp

Ok, now I’m reasonably pissed off. We recently upgrade from Rails 2.0.2 all the way to Rails 2.3.2 – admittedly a pretty big jump. It look quite a bit of time to get everything working again.

And then today we noticed that the widgets serving from vodpod.com didn’t seem to be getting cached properly. I went and looked at the cache headers, and sure enough:

Cache-Control: max-age=600, private

Doh! Private? Yeah, that’s gonna kill the caching. Now, private is the default in Rails, so I knew we had code that override that setting. It looked like this:

expires_in 10.minutes, :private => false

Hmm..that used to work. So I go check the Rails 2.3.2 docs for “expires_in”:

expires_in 3.hours, :public => true

W! T! F! “public => true”! I go check the source, and sure enough, :private is totally ignored.

Just to be clear here, this is BAD BAD BAD BAD!!. Reversing the option logic for a public API, just for fun. No deprecation warning, nuthin. This is bad form, is guaranteed to break people’s apps, and to do it silently to boot. Whoever checked this change in should get banned from Rails commits for a release cycle.

2 Responses leave one →
  1. 2009 July 22

    Easy enough to track down…it was DHH who made the commit. http://github.com/rails/rails/commit/f2a32bd0dedf11021027e36cc2c99f97434cae17

  2. 2009 July 22
    scottp permalink

    Alright, well perhaps “banned from commits” was perhaps going a little far, but I stand by the complaint. If someone wants to explain how I’m suffering from some fundamental misconception then I’m happy to hear it.

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS