Question about template

In some application (check from railsday svn) ,i’ll notice this code:

<%= yield :something %>

What does this mean ? When use it ?

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

Thanks


djtal

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.