one more maps in maps error
This commit is contained in:
parent
e72ae5df94
commit
b52523e7be
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ module TopicsHelper
|
||||||
def autocomplete_array_json(topics)
|
def autocomplete_array_json(topics)
|
||||||
topics.map do |t|
|
topics.map do |t|
|
||||||
is_map = t.is_a?(Map)
|
is_map = t.is_a?(Map)
|
||||||
|
metamapMetacode = Metacode.find_by_name('Metamap')
|
||||||
{
|
{
|
||||||
id: t.id,
|
id: t.id,
|
||||||
label: t.name,
|
label: t.name,
|
||||||
|
@ -16,7 +17,7 @@ module TopicsHelper
|
||||||
rtype: is_map ? 'map' : 'topic',
|
rtype: is_map ? 'map' : 'topic',
|
||||||
inmaps: is_map ? [] : t.inmaps,
|
inmaps: is_map ? [] : t.inmaps,
|
||||||
inmapsLinks: is_map ? [] : t.inmapsLinks,
|
inmapsLinks: is_map ? [] : t.inmapsLinks,
|
||||||
type: is_map ? metamapsMetacode.name : t.metacode.name,
|
type: is_map ? metamapMetacode.name : t.metacode.name,
|
||||||
typeImageURL: is_map ? metamapMetacode.icon : t.metacode.icon,
|
typeImageURL: is_map ? metamapMetacode.icon : t.metacode.icon,
|
||||||
mapCount: is_map ? 0 : t.maps.count,
|
mapCount: is_map ? 0 : t.maps.count,
|
||||||
synapseCount: is_map ? 0 : t.synapses.count,
|
synapseCount: is_map ? 0 : t.synapses.count,
|
||||||
|
|
Loading…
Reference in a new issue