diff options
author | Nathan Weizenbaum <nex342@gmail.com> | 2009-11-05 20:07:14 -0800 |
---|---|---|
committer | Yehuda Katz <wycats@Yehuda-Katz.local> | 2009-11-05 20:08:04 -0800 |
commit | cbded53671bccccbaf7e9fdfa93ef86cb097daa3 (patch) | |
tree | ed0fefcbec62b2ab3f2495d3180c07c0475b24fb /actionpack/test/fixtures/layouts | |
parent | cb9a1759c0b8ad104b8e591b952bc440f9e06dc0 (diff) | |
download | rails-cbded53671bccccbaf7e9fdfa93ef86cb097daa3.tar.gz rails-cbded53671bccccbaf7e9fdfa93ef86cb097daa3.tar.bz2 rails-cbded53671bccccbaf7e9fdfa93ef86cb097daa3.zip |
When rendering layouts with blocks, use #capture to avoid assuming that the return value is the block's content.
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
Diffstat (limited to 'actionpack/test/fixtures/layouts')
-rw-r--r-- | actionpack/test/fixtures/layouts/block_with_layout.erb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/test/fixtures/layouts/block_with_layout.erb b/actionpack/test/fixtures/layouts/block_with_layout.erb index 6a8b41914b..f25b41271d 100644 --- a/actionpack/test/fixtures/layouts/block_with_layout.erb +++ b/actionpack/test/fixtures/layouts/block_with_layout.erb @@ -1,3 +1,3 @@ -<% render(:layout => "layout_for_partial", :locals => { :name => "Anthony" }) do %>Inside from first block in layout<% end %> +<% render(:layout => "layout_for_partial", :locals => { :name => "Anthony" }) do %>Inside from first block in layout<% "Return value should be discarded" %><% end %> <%= yield %> <% render(:layout => "layout_for_partial", :locals => { :name => "Ramm" }) do %>Inside from second block in layout<% end %> |