yield in view helpers behaves unexpectedly #948

Closed
lighthouse-import opened this Issue May 16, 2011 · 1 comment

Comments

Projects
None yet
1 participant

Imported from Lighthouse. Original ticket at: http://rails.lighthouseapp.com/projects/8994/tickets/6607
Created by Victor Lin - 2011-03-22 22:39:21 UTC

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.

Imported from Lighthouse.
Comment by Andrew White - 2011-03-23 18:18:59 UTC

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

joevandyk pushed a commit to joevandyk/rails that referenced this issue May 24, 2011

joevandyk pushed a commit to joevandyk/rails that referenced this issue May 24, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment