From 143ed7edc32f875882f972ce444c9fa8ea028326 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Sat, 16 Apr 2011 17:32:04 -0300 Subject: Added Spacer Templates on Partials section of ActionView guide. --- railties/guides/source/action_view_overview.textile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'railties/guides') diff --git a/railties/guides/source/action_view_overview.textile b/railties/guides/source/action_view_overview.textile index 72fcb8c0e6..ab9b910270 100644 --- a/railties/guides/source/action_view_overview.textile +++ b/railties/guides/source/action_view_overview.textile @@ -212,6 +212,16 @@ You can use a shorthand syntax for rendering collections. Assuming @products is Rails determines the name of the partial to use by looking at the model name in the collection. In fact, you can even create a heterogeneous collection and render it this way, and Rails will choose the proper partial for each member of the collection. +h5. Spacer Templates + +You can also specify a second partial to be rendered between instances of the main partial by using the +:spacer_template+ option: + + +<%= render @products, :spacer_template => "product_ruler" %> + + +Rails will render the +_product_ruler+ partial (with no data passed in to it) between each pair of +_product+ partials. + h3. Using Templates, Partials and Layouts in "The Rails Way" TODO... -- cgit v1.2.3