Commit ed039827 authored by Martin Markech's avatar Martin Markech
Browse files

Fix nil errors bugs

parent 839a4ce1
Pipeline #26226 failed with stages
in 0 seconds
......@@ -24,7 +24,7 @@ module Refinery
truncate(item.body, {
:length => Refinery::Setting.find_or_set(:news_item_teaser_length, 250),
:preserve_html_tags => true
}).html_safe
}).try(:html_safe)
end
end
......
......@@ -9,7 +9,7 @@
<small><%= t('.source') %> <%= @item.source %></small>
</p>
<% end %>
<%= @item.body.html_safe %>
<%= @item.body.try(:html_safe) %>
<p>
<%= link_to t('.back_to_index'), refinery.news_items_path %>
</p>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment