Best Way to Write Helpers Using Markaby?

Ethan Winn ethan at
Mon Nov 26 00:21:08 EST 2007

Hey there Merbers,

I'm a Merb neophyte checking it out with a simple app exploration  
after being inspired by Mr. Katz's presentation @ JQueryCamp and with  
the desire to use Markaby if at all possible (I heart camping). I've  
done a little exploration of how to use Markaby in helper code, but  
any guidance would definitely be appreciated (I definitely do not  
understand the "Merb way").

At first I tried just putting the `tag_name do` blocks right in my  
helpers, but this didn't work out.  What I've found does work is  
wrapping this code in ` do` blocks, such as  

     def tasks_table tasks do
         p "update tasks below"
         table do
           tasks.each do |task|

While this works, I'm pretty sure that making a new builder instance  
for each helper call.

What's the "right" way?


Ethan Winn
ethan at

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Merb-devel mailing list