Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Patch for incorrect template choice in ActionController::Responder

#4563

The current head version of the bundled ActionController::Responder has a bug
that causes it to render new even if the method is put when the method is overriden.

This was caused by recent (well, Rails 3.0.0.beta3) changes that introduced
request.request_method and it's counterparts alongside request.method, the former
being equivalent to the old version of the latter. Unfortunately, in this change
the responder didn't get updated to use the correct method (request_method_symbol
versus the incorrect method_symbol).

The attached patch fixes this and includes tests that reproduce the bug. It applies
cleanly on master as of May 9th, 2010.

Reported by Darcy Laycock · May 9th, 2010 @ 01:30 PM

State: resolved
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Dan Pickett
    Dan Pickett
    • Tag changed from action_controller, bug, patch, rails3, responder to action_controller, bug, bugmash, patch, rails3, responder

    May 9th, 2010 @ 06:38 PM

  2. Diego Algorta
    Diego Algorta

    verified

    Submitting a rebased patch for current master with no changes.

    May 15th, 2010 @ 06:54 PM

  3. Michal Kuklis
  4. Enrico Bianco
    Enrico Bianco

    +1

    Applies cleanly against master, verified that the test fails without the provided code that fixes the issue (and that tests pass when it is in place).

    May 16th, 2010 @ 01:17 AM

  5. Antti Tarvainen
    Antti Tarvainen

    I didn't notice this ticket, and created a patch too, attached. I am happy with Diego's solution, but here's an alternative for reference, with a slightly different way of testing.

    May 23rd, 2010 @ 12:41 PM

  6. Darcy Laycock
  7. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to resolved

    June 20th, 2010 @ 03:09 PM