Write your template code in Ruby using a Builder-style syntax.
An example layout…
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
It can also be used inline, i.e. within a controller…
class FooController < ApplicationController
def index
render_markaby do
h1 'hello world'
end
end
end
To install in your Rails app:
script/plugin install http://code.whytheluckystiff.net/svn/markaby/trunkTo use it, add templates with a .mab extension.
Write your template code in Ruby using a Builder-style syntax.
An example layout…
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
It can also be used inline, i.e. within a controller…
class FooController < ApplicationController
def index
render_markaby do
h1 'hello world'
end
end
end
To install in your Rails app:
script/plugin install http://code.whytheluckystiff.net/svn/markaby/trunkTo use it, add templates with a .mab extension.