a yield problem

hi,

could someone tell me what is the difference between <%yield%> and < %yield :layout %> ???

Thx in advance, radu

<%= yield %> works like a 'catch-all' inside layout files. if you don't specify where some code should be rendered it just ends up there. you could also use <%= @content_for_layout %>

there is a nice railscast by ryan bates covering that.

and what about <%yield :layout %> ??? thx!

<%= yield :layout %> outputs everything that is created with <% content_for :layout do %>...<% end %>.

here is ryans railscast: #8 Layouts and content_for - RailsCasts

and what about <%yield :layout %> ??? thx!

thx a lot MaD.Much appreciate it, i have rated your reply with 5/5 stars :d all my best, radu