This project is archived and is in readonly mode.
rendering rjs partial breaks response content type
-
José Valim
Could you please provide a failing test case?
-
José Valim
- Assigned user set to Yehuda Katz (wycats)
-
Alexander Stanko
Here is a diff file with the test that you have requested.
-
Alexander Stanko
- Tag changed from rjs to rails3, rjs
-
José Valim
- Assigned user changed from Yehuda Katz (wycats) to José Valim
-
José Valim
- State changed from new to open
Hey Alexander, thanks for the patch!
I'm looking for a solution, meanwhile, do you mind creating a new patch using git format-patch? This way you will have the commit authorship.
-
José Valim
- Assigned user changed from José Valim to Yehuda Katz (wycats)
-
José Valim
- State changed from open to invalid
- Assigned user changed from Yehuda Katz (wycats) to José Valim
After discussing with Yehuda once again and other people, we came to the fact we don't want to support this scenario explicitly. If you need to render another formats (like js) from a template, you will need to explicitly tell the lookup context object (which holds all information used on lookup) that it should consider this new format. In your case, you should try something like this:
update_details(:formats => [:js]){ render "rjs_template" }Please let me know if it works as expected!
-
Falk Pauser
- Importance changed from to High
I just needed this too - and it works as expected:
<%= update_details(:formats => [:js]) { render 'shared/specific-js-template' } %>
