Before (Anthony) Inside from partial (Anthony) After Before (David) Inside from partial (David) After Before (Ramm) Inside from partial (Ramm) After
(closed defect: fixed)
<% render(:layout => "layout_for_partial", :locals => { :name => "Anthony" }) do %>Inside from first block in layout<% end %> <%= yield %> <% render(:layout => "layout_for_partial", :locals => { :name => "Ramm" }) do %>Inside from second block in layout<% end %> /layouts/application.html.erb
When rendering a layout) in a partial (with a main layout, the main page content is the layout and stored in @content_for_layout, the content is called from the @content_for_layout rendered is because the partial. e.g.
This currently fails on Rails project at
render_partial_with_layout_patch_2.diff
74 tests, 249 assertions, 0 failures, 0 errors
/controller/_layout_for_partial.html.erb
Trying to trunk now. 1 on 12/18/07 04:08:56.
<%= render(:layout => "layout_for_partial", :partial => "partial_for_use_in_layout", :locals => { :name => "David" }) %> Download in other formats:
[PATCH] Render partial with layout works incorrectly when rendered both within content_for_layout and a wrapper layout the Before (Anthony) Inside from partial (Anthony) After Inside from partial (Anthony) Before (Ramm) Inside from partial (Ramm) After
#9209 ([PATCH] Render partial with layout works incorrectly when rendered from site layout) - Rails Trac - Trac
RSS Feed core [8541] r8429 resolution new . normal Weblog (4.9 kB) - added by
Loaded suite actionpack/test/controller/new_render_test Started .......................................................................... Finished in 0.182891 seconds.
[PATCH] Render partial with layout works incorrectly when rendered from site layout to [PATCH] Render partial with layout works incorrectly when rendered from site layout