This project is archived and is in readonly mode.
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
-
josh December 20th, 2008 @ 04:37 PM
- Assigned user set to josh
- State changed from new to open
-
josh December 28th, 2008 @ 08:56 PM
- Assigned user changed from josh to Yehuda Katz (wycats)
Yehuda is refactoring this area
-
Repository January 27th, 2009 @ 08:07 PM
- State changed from open to resolved
(from [093f758bd05d5b6144fd06aa0606c2f987c4ee09]) Restore implicit rendering for XHR requests that want a HTML template [#1590 state:resolved] http://github.com/rails/rails/co...
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>
People watching this ticket
Referenced by
- 1590 XHRs require explicit respond_to() (from [093f758bd05d5b6144fd06aa0606c2f987c4ee09]) Restore...