From 6d0ddd818aec1704b48fe67fd4f1e15de3dc549e Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 30 Apr 2005 08:29:50 +0000 Subject: Fixed render_partial_collection to output an empty string instead of nil when handed an empty array #1202 [Ryan Carver] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1249 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_controller/base.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack') diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index e1c1ef5391..ba7b22b7f7 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed render_partial_collection to output an empty string instead of nil when handed an empty array #1202 [Ryan Carver] + * Improved the speed of regular expression expirations for caching by a factor of 10 #1221 [Jamis Buck] * Removed dumping of template assigns on the rescue page as it would very easily include a ton of data making page loads take seconds (and the information was rarely helpful) #1222 diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 15724e2e36..eebca26191 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -504,7 +504,7 @@ module ActionController #:nodoc: # Renders a collection of partials using partial_name to iterate over the +collection+. def render_partial_collection(partial_name, collection, partial_spacer_template = nil, local_assigns = {})#:doc: add_variables_to_assigns - render_text(@template.render_collection_of_partials(partial_name, collection, partial_spacer_template, local_assigns)) + render_text(@template.render_collection_of_partials(partial_name, collection, partial_spacer_template, local_assigns) || '') end # Sends the file by streaming it 4096 bytes at a time. This way the -- cgit v1.2.3