From 4eb89873c9ba4032c07447e5b454fcf8f548e671 Mon Sep 17 00:00:00 2001 From: Prem Sichanugrist Date: Sun, 12 Sep 2010 14:59:12 +0700 Subject: Add documentation for `:spacer_template` in Rails 3 This setting was existed since Rails 2.3.x, and seems like it have been left out when we rewriting the documentation. --- actionpack/lib/action_view/render/partials.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionpack') diff --git a/actionpack/lib/action_view/render/partials.rb b/actionpack/lib/action_view/render/partials.rb index 6ad40ad8d4..19bd04c4b8 100644 --- a/actionpack/lib/action_view/render/partials.rb +++ b/actionpack/lib/action_view/render/partials.rb @@ -71,6 +71,11 @@ module ActionView # # The :as option may be used when rendering partials. # + # Also, you can specify a partial which will be render as a spacer between each element by passing partial name to + # +:spacer_template+. The following example will render "advertiser/_ad_divider.erb" between each ad partial. + # + # <%= render :partial => "ad", :collection => @advertisements, :spacer_template => "ad_divider" %> + # # NOTE: Due to backwards compatibility concerns, the collection can't be one of hashes. Normally you'd also # just keep domain objects, like Active Records, in there. # -- cgit v1.2.3