As I found, same can be done the way which works in 2.0.6 def helper_method( &haml_block ) html = capture &haml_block ...
But the idea was not to just yield inside this new block as I showed in the previous post, but to call another helper method inside capture block with &haml_block as a parameter, and this won't work anyway. Is there any other way to check that block is producing haml result except for eval( '_hamlout', block.binding )? In my previous post block.binding is not haml, but result is still going to _hamlout and should be processed by capture_haml. Why not check both buffers after block execution and take whichever is not empty? > 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 -~----------~----~----~----~------~----~------~--~---
