Re: Onlamp tutorial - questions/comments

Scott
Tue, 27 Feb 2007 14:13:35 -0000

The %Q is used to quote the contents... it usefulness becomes more
apparent when you have lots of embedded single and double quotes.

Scott

On Feb 27, 8:08 am, Kevin Tambascio
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:
> > (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 viahttp://www.ruby-forum.com/.