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/lib/action_controller/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller') 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