From d5645fd4a0b8160646e69273626a77badd9ab1a4 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 3 Jan 2008 15:28:36 +0000 Subject: Fixed rendering of partials with layout when done from site layout (closes #9209) [antramm] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8541 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/fixtures/layouts/block_with_layout.erb | 3 +++ actionpack/test/fixtures/layouts/partial_with_layout.erb | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 actionpack/test/fixtures/layouts/block_with_layout.erb create mode 100644 actionpack/test/fixtures/layouts/partial_with_layout.erb (limited to 'actionpack/test/fixtures') diff --git a/actionpack/test/fixtures/layouts/block_with_layout.erb b/actionpack/test/fixtures/layouts/block_with_layout.erb new file mode 100644 index 0000000000..6a8b41914b --- /dev/null +++ b/actionpack/test/fixtures/layouts/block_with_layout.erb @@ -0,0 +1,3 @@ +<% 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 %> diff --git a/actionpack/test/fixtures/layouts/partial_with_layout.erb b/actionpack/test/fixtures/layouts/partial_with_layout.erb new file mode 100644 index 0000000000..a0349d731e --- /dev/null +++ b/actionpack/test/fixtures/layouts/partial_with_layout.erb @@ -0,0 +1,3 @@ +<%= render( :layout => "layout_for_partial", :partial => "partial_for_use_in_layout", :locals => {:name => 'Anthony' } ) %> +<%= yield %> +<%= render( :layout => "layout_for_partial", :partial => "partial_for_use_in_layout", :locals => {:name => 'Ramm' } ) %> \ No newline at end of file -- cgit v1.2.3