Invoking *capture* from helper method I get nil as as result. The
problems is in "&& block_is_haml?(block)" which was added in 2.0.6.

diff --git a/lib/haml/helpers/action_view_mods.rb b/lib/haml/helpers/
action_view_mods.rb
index 0eb3e2b..2ade335 100644
--- a/lib/haml/helpers/action_view_mods.rb
+++ b/lib/haml/helpers/action_view_mods.rb
@@ -86,7 +86,7 @@ if defined?(ActionView) and not defined?
(Merb::Plugins)
       else
         module CaptureHelper
           def capture_with_haml(*args, &block)
-            if is_haml?
+            if is_haml? && block_is_haml?(block)
               capture_haml(*args, &block)
             else
               capture_without_haml(*args, &block)

Helper:

def helper_method
  html = capture do
    yield
  end
  ... processing html, html is nil here
end

Haml:

- helper_method do
  %div
     ....


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to