Permalink
Browse files

Fixed that render_partial_collection should always return a string (a…

…nd not sometimes an array, despite <%= %> not caring)

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1302 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent ee68826 commit 51f9c931ea47034bcedd5196a783262a4530386d @dhh dhh committed May 13, 2005
Showing with 4 additions and 1 deletion.
  1. +2 −0 actionpack/CHANGELOG
  2. +2 −1 actionpack/lib/action_view/partials.rb
View
2 actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fixed that render_partial_collection should always return a string (and not sometimes an array, despite <%= %> not caring)
+
* Added TextHelper#sanitize that can will remove any Javascript handlers, blocks, and forms from an input of HTML. This allows for use of HTML on public sites, but still be free of XSS issues. #1277 [Jamis Buck]
* Fixed the HTML scanner used by assert_tag where a infinite loop could be caused by a stray less-than sign in the input #1270 [Jamis Buck]
View
3 actionpack/lib/action_view/partials.rb
@@ -59,11 +59,12 @@ def render_partial_collection(partial_name, collection, partial_spacer_template
end
return nil if collection_of_partials.empty?
+
if partial_spacer_template
spacer_path, spacer_name = partial_pieces(partial_spacer_template)
collection_of_partials.join(render("#{spacer_path}/_#{spacer_name}"))
else
- collection_of_partials
+ collection_of_partials.join
end
end

0 comments on commit 51f9c93

Please sign in to comment.