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.

js.rjs views no longer found after render_to_string call

#870

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.

Reported by Henning · August 20th, 2008 @ 03:43 PM

State: resolved
Milestone: 2.x
Assigned to: josh josh
Importance: none

Activity

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

    Can you please attach a failing unit test.

    November 22nd, 2008 @ 06:59 AM

  2. josh
    josh
    • State changed from incomplete to wontfix

    November 22nd, 2008 @ 05:43 PM

  3. Nick Hoffman
    Nick Hoffman

    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

    November 22nd, 2008 @ 06:23 PM

  4. josh
    josh
    • State changed from wontfix to incomplete

    thanks

    November 22nd, 2008 @ 06:27 PM

  5. Henning
    Henning

    Nick: Thank you for offering to write the test. Please let me know if you run into problems.

    November 22nd, 2008 @ 09:04 PM

  6. Nick Hoffman
    Nick Hoffman

    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

    November 26th, 2008 @ 04:35 AM

  7. Henning
  8. Nick Hoffman
    Nick Hoffman

    No problem, Henning. I hope what I submitted is appropriate.

    November 26th, 2008 @ 10:47 PM

  9. josh
    josh
    • State changed from incomplete to open

    November 27th, 2008 @ 03:13 AM

  10. josh
    josh

    Nick, could you make it a git patch if possible?

    (Traveling right now, I'll get back to this ticket in a few days)

    November 27th, 2008 @ 03:15 AM

  11. Nick Hoffman
    Nick Hoffman

    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

    November 27th, 2008 @ 07:29 PM

  12. josh
    josh

    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

    November 28th, 2008 @ 02:16 AM

  13. josh
    josh
    • State changed from open to incomplete

    November 29th, 2008 @ 10:04 PM

  14. josh
    josh
    • State changed from incomplete to resolved

    http://github.com/rails/rails/co...

    I think this did fix it.

    December 3rd, 2008 @ 04:13 PM