[Markaby] yield instead of @content_for_layout?

We’re supposed to use yield instead of @content_for_layout, but I can’t
get yield to work in a Markaby template:

yield

text yield

Either one of these lines results in a ‘no block given’ error (but ‘text
@content_for_layout’ works). Anybody know how to use yield instead?

Thanks,
Joe

Joe R. wrote:

We’re supposed to use yield instead of @content_for_layout, but I can’t
get yield to work in a Markaby template:

yield

text yield

Either one of these lines results in a ‘no block given’ error (but ‘text
@content_for_layout’ works). Anybody know how to use yield instead?

Thanks,
Joe

Use content_for_layout method.

I use yield all the time:
<%= yield %>

I’m on Rails 1.2.3 and Ruby 1.8.5 – maybe your version is the issue
(as I recall, ‘yield’ is the newer, preferred method).

…jon

On Apr 3, 7:20 am, Ilya N. [email protected]