[Rails] Question about template

Jean-François jf.web3 at gmail.com
Mon Jun 26 23:35:50 GMT 2006


Hello Guillaume,

> In some application (check from railsday svn) ,i'll notice this code:
>
> <%= yield :something %>
>
> What does this mean ?

yield is the Ruby yield.

> When use it ?

It's equivalent to @content_for_something

also <%= yield %> is equivalent to <%= @content_for_layout %> .

But using the @content_for* variables instances directly is deprecated
now in Edge.

> Sorry if question was ever posted but i can't find it.

HTH,
      -- Jean-François.

-- 
À la renverse.


More information about the Rails mailing list