themengruppe check if nil

This commit is contained in:
Andreas Stephanides
2015-05-07 20:02:42 +02:00
parent 69fa1ed634
commit 0f11ccfcfe

View File

@@ -29,7 +29,7 @@
<%= link_to themengruppe do %> <%= link_to themengruppe do %>
<p> <p>
<%= if themengruppe.text.split.size > Themengruppe::WORD_COUNT <%= if !themengruppe.text.nil? && themengruppe.text.split.size > Themengruppe::WORD_COUNT
themengruppe.text.split[0..Themengruppe::WORD_COUNT].join(" ") + " ..." themengruppe.text.split[0..Themengruppe::WORD_COUNT].join(" ") + " ..."
else else
themengruppe.text themengruppe.text