Markaby (Markup as Ruby) plugin

With the help of Tim F., I’m glad to present a new plugin for
writing HTML templates in plain Ruby. You write .mab templates in
app/views/ which contain Builder-like representations of HTML.

As an illustration, here is the scaffold edit.rhtml remade as Markaby:

h1 ‘Editing product’

start_form_tag :action => ‘update’, :id => @product
render :partial => ‘form’
submit_tag ‘Edit’
end_form_tag

link_to ‘Show’, :action => ‘show’, :id => @product
text " | "
link_to ‘Back’, :action => ‘list’

To install in your Rails app:

script/plugin install
http://code.whytheluckystiff.net/svn/markaby/trunk

Many more examples and caveats can be looked over at the announcement:

http://redhanded.hobix.com/inspect/markabyForRails.html

Beaver tales,

_why