This project is archived and is in readonly mode.

#1590 ✓resolved
Kyle Hargraves

XHRs require explicit respond_to()

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

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.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages