aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikachu.com>2010-09-12 14:59:12 +0700
committerPrem Sichanugrist <s@sikachu.com>2010-09-13 10:04:39 +0700
commit4eb89873c9ba4032c07447e5b454fcf8f548e671 (patch)
tree8f82b260741fcd7a8369d15918d4e08c489dd81a /actionpack
parent02656ac3978fccb3091b86175232c7232b6cf210 (diff)
downloadrails-4eb89873c9ba4032c07447e5b454fcf8f548e671.tar.gz
rails-4eb89873c9ba4032c07447e5b454fcf8f548e671.tar.bz2
rails-4eb89873c9ba4032c07447e5b454fcf8f548e671.zip
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.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/render/partials.rb5
1 files changed, 5 insertions, 0 deletions
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.
#