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.

XHRs require explicit respond_to()

#1590

After updating to edge rails, any XHRs which relied on implicit rendering were raising MissingTemplate errors for 'bar.erb' -- note that it is not 'bar.html.erb'. Adding the respond_to{wants.html} boilerplate solved the problem, but I believe this would be considered a regression.

This is easily reproducible against a new app with an empty action and a corresponding .html.erb template: curl -H 'X-Requested-With: XMLHttpRequest' http://localhost:3000/foo/bar.

git-bisect tells me the bug was introduced in 148aff2. Reverting the commit was enough to fix it for our applications, but I don't use RJS.

Reported by Kyle Hargraves · December 17th, 2008 @ 04:58 PM

State: resolved
Milestone: none
Assigned to: Yehuda Katz (wycats) Yehuda Katz (wycats)
Importance: none

Activity

  1. josh
    josh
    • Assigned user set to josh
    • State changed from new to open

    December 20th, 2008 @ 04:37 PM

  2. josh
  3. josh
    josh
    • Assigned user changed from josh to Yehuda Katz (wycats)

    Yehuda is refactoring this area

    December 28th, 2008 @ 08:56 PM

  4. Repository
    Repository
    • State changed from open to resolved

    (from [093f758bd05d5b6144fd06aa0606c2f987c4ee09]) Restore implicit rendering for XHR requests that want a HTML template [#1590 XHRs require explicit respond_to() state:resolved] http://github.com/rails/rails/co...

    January 27th, 2009 @ 08:07 PM