diff options
author | Ryan Bates <ryan@railscasts.com> | 2008-08-19 19:09:04 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-08-19 19:09:04 -0500 |
commit | a8ece12fe2ac7838407954453e0d31af6186a5db (patch) | |
tree | 5a6cb0a957bebc1da95c1918563db10447cacd26 /actionpack/lib/action_view/partials.rb | |
parent | 71c4ff07ab4313c1f4781d59ad2f4528f5875665 (diff) | |
download | rails-a8ece12fe2ac7838407954453e0d31af6186a5db.tar.gz rails-a8ece12fe2ac7838407954453e0d31af6186a5db.tar.bz2 rails-a8ece12fe2ac7838407954453e0d31af6186a5db.zip |
Return nil instead of a space when passing an empty collection or nil to 'render :partial' [#791 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/lib/action_view/partials.rb')
-rw-r--r-- | actionpack/lib/action_view/partials.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/partials.rb b/actionpack/lib/action_view/partials.rb index b661a62677..074ba5a2b5 100644 --- a/actionpack/lib/action_view/partials.rb +++ b/actionpack/lib/action_view/partials.rb @@ -161,7 +161,7 @@ module ActionView end def render_partial_collection(partial_path, collection, partial_spacer_template = nil, local_assigns = {}, as = nil) #:nodoc: - return " " if collection.empty? + return nil if collection.blank? local_assigns = local_assigns ? local_assigns.clone : {} spacer = partial_spacer_template ? render(:partial => partial_spacer_template) : '' |