fix some errors with controllers/serializers

This commit is contained in:
Devin Howard 2016-07-01 15:18:38 +08:00
parent 2ffd62674d
commit dcd3cc6e78
6 changed files with 1 additions and 6 deletions

View file

@ -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

View file

@ -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'

View file

@ -1,5 +1,4 @@
class NewMapSerializer < ActiveModel::Serializer
embed :ids, include: true
attributes :id,
:name,
:desc,

View file

@ -1,5 +1,4 @@
class NewMappingSerializer < ActiveModel::Serializer
embed :ids, include: true
attributes :id,
:xloc,
:yloc,

View file

@ -1,5 +1,4 @@
class NewSynapseSerializer < ActiveModel::Serializer
embed :ids, include: true
attributes :id,
:desc,
:category,

View file

@ -1,5 +1,4 @@
class NewTopicSerializer < ActiveModel::Serializer
embed :ids, include: true
attributes :id,
:name,
:desc,