My good old friend for nested layouts, inside_layout
def inside_layout(layout, &block) layout = layout.include?('/') ? layout : "layouts/#{layout}" concat(@template.render_file(layout, true, '@content_for_layout' => capture(&block)), block.binding) end
suddenly stopped to work, and since i am so grateful for his long months of service, he got replaced by the next best thing 😉
<% @content_for_layout = capture do %> ...some text or html... <%= render :file=>'layouts/application', :content_for_layout => @content_for_layout %>
Probably from http://dev.rubyonrails.org/ticket/9209
I’m still on 2.0.2 and I applied that patch rather than setup inside_layout.
So it should come with the next rails release/is in edge, good to know 🙂