fix truncate bug when map desc is nil
This commit is contained in:
parent
b0860ef670
commit
2989406954
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ module MapsHelper
|
||||||
map['id'] = m.id
|
map['id'] = m.id
|
||||||
map['label'] = m.name
|
map['label'] = m.name
|
||||||
map['value'] = m.name
|
map['value'] = m.name
|
||||||
map['description'] = m.desc.truncate(30)
|
map['description'] = m.desc.try(:truncate, 30)
|
||||||
map['permission'] = m.permission
|
map['permission'] = m.permission
|
||||||
map['topicCount'] = m.topics.count
|
map['topicCount'] = m.topics.count
|
||||||
map['synapseCount'] = m.synapses.count
|
map['synapseCount'] = m.synapses.count
|
||||||
|
|
Loading…
Reference in a new issue