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
|
||||
|
||||
#limit to 5 results
|
||||
@synapses = @synapses.slice(0,5)
|
||||
@synapses = @synapses.to_a.slice(0,5)
|
||||
|
||||
render json: autocomplete_synapse_array_json(@synapses)
|
||||
end
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
class EventSerializer < ActiveModel::Serializer
|
||||
embed :ids, include: true
|
||||
attributes :id, :sequence_id, :kind, :map_id, :created_at
|
||||
|
||||
has_one :actor, serializer: NewUserSerializer, root: 'users'
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
class NewMapSerializer < ActiveModel::Serializer
|
||||
embed :ids, include: true
|
||||
attributes :id,
|
||||
:name,
|
||||
:desc,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
class NewMappingSerializer < ActiveModel::Serializer
|
||||
embed :ids, include: true
|
||||
attributes :id,
|
||||
:xloc,
|
||||
:yloc,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
class NewSynapseSerializer < ActiveModel::Serializer
|
||||
embed :ids, include: true
|
||||
attributes :id,
|
||||
:desc,
|
||||
:category,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
class NewTopicSerializer < ActiveModel::Serializer
|
||||
embed :ids, include: true
|
||||
attributes :id,
|
||||
:name,
|
||||
:desc,
|
||||
|
|
Loading…
Reference in a new issue