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’

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

To install in your Rails app:

script/plugin install

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

Beaver tales,


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs