fix some errors with controllers/serializers
This commit is contained in:
parent
2ffd62674d
commit
dcd3cc6e78
6 changed files with 1 additions and 6 deletions
|
@ -175,7 +175,7 @@ class MainController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
#limit to 5 results
|
#limit to 5 results
|
||||||
@synapses = @synapses.slice(0,5)
|
@synapses = @synapses.to_a.slice(0,5)
|
||||||
|
|
||||||
render json: autocomplete_synapse_array_json(@synapses)
|
render json: autocomplete_synapse_array_json(@synapses)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class EventSerializer < ActiveModel::Serializer
|
class EventSerializer < ActiveModel::Serializer
|
||||||
embed :ids, include: true
|
|
||||||
attributes :id, :sequence_id, :kind, :map_id, :created_at
|
attributes :id, :sequence_id, :kind, :map_id, :created_at
|
||||||
|
|
||||||
has_one :actor, serializer: NewUserSerializer, root: 'users'
|
has_one :actor, serializer: NewUserSerializer, root: 'users'
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class NewMapSerializer < ActiveModel::Serializer
|
class NewMapSerializer < ActiveModel::Serializer
|
||||||
embed :ids, include: true
|
|
||||||
attributes :id,
|
attributes :id,
|
||||||
:name,
|
:name,
|
||||||
:desc,
|
:desc,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class NewMappingSerializer < ActiveModel::Serializer
|
class NewMappingSerializer < ActiveModel::Serializer
|
||||||
embed :ids, include: true
|
|
||||||
attributes :id,
|
attributes :id,
|
||||||
:xloc,
|
:xloc,
|
||||||
:yloc,
|
:yloc,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class NewSynapseSerializer < ActiveModel::Serializer
|
class NewSynapseSerializer < ActiveModel::Serializer
|
||||||
embed :ids, include: true
|
|
||||||
attributes :id,
|
attributes :id,
|
||||||
:desc,
|
:desc,
|
||||||
:category,
|
:category,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class NewTopicSerializer < ActiveModel::Serializer
|
class NewTopicSerializer < ActiveModel::Serializer
|
||||||
embed :ids, include: true
|
|
||||||
attributes :id,
|
attributes :id,
|
||||||
:name,
|
:name,
|
||||||
:desc,
|
:desc,
|
||||||
|
|
Loading…
Reference in a new issue