aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/fixtures
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-08-02 20:10:03 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-08-02 20:10:03 +0000
commitbbbc45156bb2f903513116036619b78065f6d7e8 (patch)
tree85a3e79931142fe229c15ff04185c57272f4e0b3 /actionpack/test/fixtures
parentbe196f3f7ec86e072d455cdca6acae1fd8782066 (diff)
downloadrails-bbbc45156bb2f903513116036619b78065f6d7e8.tar.gz
rails-bbbc45156bb2f903513116036619b78065f6d7e8.tar.bz2
rails-bbbc45156bb2f903513116036619b78065f6d7e8.zip
Added partial layouts (see example in action_view/lib/partials.rb) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7261 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/fixtures')
-rw-r--r--actionpack/test/fixtures/test/_layout_for_partial.html.erb3
-rw-r--r--actionpack/test/fixtures/test/_partial_for_use_in_layout.html.erb1
-rw-r--r--actionpack/test/fixtures/test/calling_partial_with_layout.html.erb1
-rw-r--r--actionpack/test/fixtures/test/using_layout_around_block.html.erb1
4 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/fixtures/test/_layout_for_partial.html.erb b/actionpack/test/fixtures/test/_layout_for_partial.html.erb
new file mode 100644
index 0000000000..666efadbb6
--- /dev/null
+++ b/actionpack/test/fixtures/test/_layout_for_partial.html.erb
@@ -0,0 +1,3 @@
+Before (<%= name %>)
+<%= yield %>
+After \ No newline at end of file
diff --git a/actionpack/test/fixtures/test/_partial_for_use_in_layout.html.erb b/actionpack/test/fixtures/test/_partial_for_use_in_layout.html.erb
new file mode 100644
index 0000000000..3a03a64e31
--- /dev/null
+++ b/actionpack/test/fixtures/test/_partial_for_use_in_layout.html.erb
@@ -0,0 +1 @@
+Inside from partial (<%= name %>) \ No newline at end of file
diff --git a/actionpack/test/fixtures/test/calling_partial_with_layout.html.erb b/actionpack/test/fixtures/test/calling_partial_with_layout.html.erb
new file mode 100644
index 0000000000..ac44bc0d81
--- /dev/null
+++ b/actionpack/test/fixtures/test/calling_partial_with_layout.html.erb
@@ -0,0 +1 @@
+<%= render(:layout => "layout_for_partial", :partial => "partial_for_use_in_layout", :locals => { :name => "David" }) %> \ No newline at end of file
diff --git a/actionpack/test/fixtures/test/using_layout_around_block.html.erb b/actionpack/test/fixtures/test/using_layout_around_block.html.erb
new file mode 100644
index 0000000000..a93fa02c9c
--- /dev/null
+++ b/actionpack/test/fixtures/test/using_layout_around_block.html.erb
@@ -0,0 +1 @@
+<% render(:layout => "layout_for_partial", :locals => { :name => "David" }) do %>Inside from block<% end %> \ No newline at end of file