Markaby template & layout (can't get them to work together)

Hi all,

I am starting a new rails app with the Markaby plugin (had some issues
installing, but think its working).

First, i created an index.mab file for a controller containing:

h1 “First template”

That rendered fine. Also, I do not have a “def index …” in the

Then I created an app/layouts/application.mab file. It didn’t get picked
up until after I restarted the webrick server. However, After I added
this code (from the markaby docs) it failed to render the controller

Tweaking code showed that the index.mab template was still being
processes, but never assigned to @content_for_layout, which is nil.

html do
head do
title “hi” #action_name
stylesheet_link_tag ‘scaffold’

body do
p flash[:notice], :style => “color: green”
self << @content_for_layout

Is there anything special I forgot to get these Markaby templates to
play together?


PS - Side question: Is there textmate highlighting for .mab templates?

for TextMate highlighting, just use the ruby syntax coloring.

I seem to remember reading that using a mab file for your layout
isn’t recommended, but in any case, I believe @content_for_layout has
been deprecated for yield.