# Markaby (Markup as Ruby) plugin

**URL:** <https://www.ruby-forum.com/t/markaby-markup-as-ruby-plugin/52258>\
**Category:** Rails\
**Created:** [January 12, 2006, 8:55am UTC](https://www.ruby-forum.com/t/markaby-markup-as-ruby-plugin/52258 "2006-01-12T08:55:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![why\_the\_lucky\_stiff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ac8455/32.png) [@why\_the\_lucky\_stiff](https://www.ruby-forum.com/u/why_the_lucky_stiff)\
**Post date:** [January 12, 2006, 8:55am UTC](https://www.ruby-forum.com/t/markaby-markup-as-ruby-plugin/52258/1 "2006-01-12T08:55:05Z")

</div>

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](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](http://redhanded.hobix.com/inspect/markabyForRails.html)

Beaver tales,

\_why
