So what you're saying is that you'd like
capture { "foo" }
to return "foo" in a helper? I'm not sure why this is useful, and I
dislike using eval to determine the enclosing scope, but I suppose it's
important to keep compatibility with Rails. I've pushed a compatibility
patch to git.
- Nathan
matthuhiggins wrote:
> On EdgeRails and Git Haml, capture_with_haml always calls
> capture_haml_with_buffer. The problem with this is that if a helper
> method that uses capture is called from a haml template, nothing gets
> captured.
>
> In Rails ActionView::Helpers::CaptureHelper.capture, the code detects
> whether it is running inside of a template or a helper. If called
> inside a helper, it simply returns 'block.call(*args)', because we
> just want the string.
>
> If Haml::Helpers.is_haml? determined if it is inside of a Helper, I
> think the problem would be fixed.
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---