Rails metal call order

I was really mystified today trying to figure out how to bump up the response in Rails metal. The default metal generator generates something that looks like the following:

I had mistakenly changed it to 500 and didn’t realize why the app completely broke. It turns out that Rails itself uses a 404 code in the metal response to go up the call chain to the next metal:

So if you want to return from the metal, just send back a 404.

Post to Twitter Post to Delicious Delicious Post to Digg Digg This Post Post to Facebook Facebook Post to Reddit Reddit This Post


Related posts:

  1. Rails Reminder: DATE_FORMATS

Tags: , ,

2 Responses to “Rails metal call order”

  1. Gadget_Blog 08. Aug, 2009 at 2:52 am #

    What I can say is very nice and helpful as well as informative post…really help me

    very much more!! Thanks..
    Cheers,
    gadgettechblog.com

  2. Gadget_Blog 08. Aug, 2009 at 6:52 am #

    What I can say is very nice and helpful as well as informative post…really help me

    very much more!! Thanks..
    Cheers,
    gadgettechblog.com

Leave a Reply