Archive for September, 2010

A New Gem For People Who Can’t Use HTTP Methods Other Than POST

Tuesday, September 28th, 2010


I needed to be able to look at query params in the URL for the _method parameter Rails uses to fake different types of POST-like requests. Rails currently doesn’t do this for you as it uses Rack::MethodOverride, and that doesn’t look at GET parameters. It only looks at the X-Http-Method-Override header and POST form params. Some Rails users filed a ticket awhile ago about it, and it is an ongoing concern(see #2289).


Being a go getter, active, knows his way around a gemspec sort of person, I whipped up a library so if you run into this problem, you can fix it easily. Rack::MethodOverrideWithParams is the result. It is a drop-in replacement for Rack::MethodOverride, so all you have to do is replace Rack::MethodOverride in your stack with it and you’ll be rocking query param method overriding goodness.

“How easily”, you might ask. Let me show you. It’s just a couple of code additions:
gem "rack-methodoverride-with-params", "~> 1"
config.middleware.swap Rack::MethodOverride, Rack::MethodOverrideWithParams


What do you think?


Rails ticket #2289

Wildfire near Boulder

Wednesday, September 8th, 2010

I’m okay, but it’s pretty big.

Here is the map:

View #boulderfire in a larger map

Speaking at Ruby|Web Conference on Friday

Wednesday, September 8th, 2010

On Friday morning I am speaking at the Ruby|Web Conference at Snowbird in Utah. I’ll be giving a talk entitled “Extreme Performance with Mirah and Dubious“. I’ll be talking about a project I’ve been helping out with called Dubious, which is a web framework written in Mirah.

Check out the source: