Saturday, January 14, 2006

More templating choice with Markaby for Rails

Posted by David

why the lucky stiff and Tim Fletcher have released a pretty cool templating language for Rails called Markaby that looks like Builder, but assumes a few more things to make it even more succinct and targeted against HTML. An Example:

 html do
   head do
     title action_name
     stylesheet_link_tag 'scaffold'
   end
 
   body do
     p flash[:notice], :style => "color: green" 
     self << @content_for_layout
   end
 end

All you need to do is install the Markaby plugin and you can start creating .mab files. Very cool.