fix truncate bug when map desc is nil

This commit is contained in:
Devin Howard 2016-06-15 12:17:32 +08:00
parent b0860ef670
commit 2989406954

View file

@ -8,7 +8,7 @@ module MapsHelper
map['id'] = m.id
map['label'] = m.name
map['value'] = m.name
map['description'] = m.desc.truncate(30)
map['description'] = m.desc.try(:truncate, 30)
map['permission'] = m.permission
map['topicCount'] = m.topics.count
map['synapseCount'] = m.synapses.count