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.

yield in view helpers behaves unexpectedly

#6607

If you yield to an ERB block within a view helper, the result of the yield will be the output buffer (unless you explicitly yield/return in your ERB template). I'm not sure this is a bug per se, but it is rather surprising behavior.

Reported by Victor Lin · March 22nd, 2011 @ 10:39 PM

State: new
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Victor Lin
    Victor Lin
    • Tag set to yield views erubis erb helper

    March 23rd, 2011 @ 06:25 AM

  2. Victor Lin
    Victor Lin
    • Tag changed from yield views erubis erb helper to erubis, helpers, views, yield

    March 23rd, 2011 @ 06:25 AM

  3. Andrew White
    Andrew White
    • Importance changed from to Low

    I think what you're seeing is the consequence of this change in Rails 3. Does the article make things clearer?

    March 23rd, 2011 @ 06:18 PM