render_detail can sometimes return nil (when no applicable formatter was registered). therefore push html_safe call down.

pull/59/head
Martin Linkhorst 12 years ago
parent b165ff2487
commit 87ec6d19eb
  1. 4
      app/helpers/journals_helper.rb

@ -48,8 +48,8 @@ module JournalsHelper
if journal.details.any?
details = content_tag "ul", :class => "details journal-attributes" do
journal.details.collect do |detail|
if d = journal.render_detail(detail, :cache => options[:cache]).html_safe
content_tag("li", d)
if d = journal.render_detail(detail, :cache => options[:cache])
content_tag("li", d.html_safe)
end
end.compact.join(' ').html_safe
end

Loading…
Cancel
Save