fast_jsonapi
fast_jsonapi copied to clipboard
support for mongoid
mongoid link is not working while render UserSerializer, getting undefined method `embeds_many'
module Api::V1
class UserSerializer < ApplicationSerializer
set_type :employee
attributes :email
# embeds_many :articles
# embeds_many :articles
end
end
That should just work with has_many :articles in the serializer.
The serializer doesn't need to care where the ORM stores the association.