I picked up an interesting tidbit at last night's ChicagoRuby meetup at David Demaree's Merb to Rails 3 presentation. I will say that there were actually a good number of technical details that he shared that were great, but this one stood out to me as something I would be able to use very easily as a strategy to migrate certain existing functionality to different implementations.
The basic idea is this: if you return a response from a controller with the X-Cascade header set to "pass", it indicates that your controller thinks something else should handle the request. So rails (or is it rack? in any case...) will continue down your routes looking for the next rule that matches the request.
What might this look like?
def update if params[:foo].nil? ... else # Allows the next matching route to handle this request head :ok, 'X-Cascade' => 'pass' end end
An important thing to note is that I don't believe that this is a useful technique to use as the entirety of a controller method's body - if all that the method does is cascade down to the next matching route, then you may as well remove the route causing the cascade. What this DOES allow you to do, though, is replace bits of potentially complex controller methods piecemeal, therefore giving you a somewhat clean migration strategy.
I should make the disclaimer that this could be abused - your peers will likely whip you if you are cascading all over the place, creating impenetrable routing logic. So I urge you to use your judgement where this might be applied - just like most tools in your toolbox.