This project is archived and is in readonly mode.
js.rjs views no longer found after render_to_string call
Reported by Henning | August 20th, 2008 @ 03:43 PM | in 2.x
When a controller action calls render_to_string before rendering its corresponding view, the corresponding view will not be found if its extension is .js.rjs.
If the default view is named action.rjs (like we did pre-Rails 2), it will be found.
Comments and changes to this ticket
-
josh November 22nd, 2008 @ 06:59 AM
- State changed from new to incomplete
- Assigned user set to josh
Can you please attach a failing unit test.
-
josh November 22nd, 2008 @ 05:43 PM
- State changed from incomplete to wontfix
-
Nick Hoffman November 22nd, 2008 @ 06:23 PM
Hi Joshua. I'll be happy to create a failing unit test. This is the first time that I'll be contributing to a ticket, so you might need to bear with me with while I learn the proper way to report things, what exactly to attach, etc.
I'll try to get on top of it this weekend.
Cheers, Nick
-
Henning November 22nd, 2008 @ 09:04 PM
Nick: Thank you for offering to write the test. Please let me know if you run into problems.
-
Nick Hoffman November 26th, 2008 @ 04:35 AM
Hey guys. Attached is the test that I wrote to show this bug in action. Just untar it and run this file: test/unit/ticket870_rjs_test.rb
If you want to play with the test, start up the app's server, point your browser to http://localhost:3000/ticket870 , and click away. Check the server's log after you click the third link.
I created this with Rails v2.1.0 and Gem v1.3.1 .
If there's anything else I should do, just let me know.
Cheers, Nick
-
Nick Hoffman November 26th, 2008 @ 10:47 PM
No problem, Henning. I hope what I submitted is appropriate.
-
josh November 27th, 2008 @ 03:13 AM
- State changed from incomplete to open
-
josh November 27th, 2008 @ 03:15 AM
Nick, could you make it a git patch if possible?
(Traveling right now, I'll get back to this ticket in a few days)
-
Nick Hoffman November 27th, 2008 @ 07:29 PM
Hi Josh. I just spent some time with the debugger, trying to track down why this bug occurs. However, I haven't been able to figure it out. Thus, I can't suggest a patch to fix it. Sorry, mate.
If you'd like me to go into detail wrt what's confusing me when stepping through the debugger, just let me know.
Cheers, Nick
-
josh November 28th, 2008 @ 02:16 AM
If you can't fix it that's okay. But an unit test patch is a little easier for everyone to verify.
Checkout the tests under actionpack/test/template
-
josh November 29th, 2008 @ 10:04 PM
- State changed from open to incomplete
-
josh December 3rd, 2008 @ 04:13 PM
- State changed from incomplete to resolved
http://github.com/rails/rails/co...
I think this did fix it.
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
Attachments
Tags
Referenced by
- 1503 Wrong mime type in rjs response in Rails 2.2.2 (sometimes) Take a look at #870 or #1182, they sound related.