Re: Onlamp tutorial - questions/comments

Kevin Tambascio
Tue, 27 Feb 2007 13:08:54 -0000

> (2) On page 3, the layout contains
>
>     <%= yield %>
>
> but in my installation of Rails (Ubuntu rails package 1.1.2-1), the
> template
> had
>
>     <%= @content_for_layout %>
>
> So I decided to stick with the latter format. However, I just want to
> know,
> is one preferred over the other? Is one deprecated?
>

I believe the <%= @content_for_layout %> was the original method to
serve as the placeholder for your logic.  I just created a new app with
Rails 1.2, and the <%= yield %> method is used.

-Kevin


--
Posted via http://www.ruby-forum.com/.