Skip to content

Commit

Permalink
Guard against render_partial returning nil
Browse files Browse the repository at this point in the history
  • Loading branch information
dolzenko committed Nov 2, 2010
1 parent 800d19d commit 2ff4349
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/render_partial_comments.rb
Expand Up @@ -4,7 +4,7 @@ class ActionView::Base

def render_partial_with_comments(options = {})
r = %{<!-- render_begin '#{options[:partial]}' -->}
r << render_partial_without_comments(options)
r << (render_partial_without_comments(options) || "")
r << %{<!-- render_end '#{options[:partial]}' -->}
r.html_safe
end
Expand Down

0 comments on commit 2ff4349

Please sign in to comment.