fast_jsonapi icon indicating copy to clipboard operation
fast_jsonapi copied to clipboard

support for mongoid

Open uzaif313 opened this issue 6 years ago • 1 comments

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

uzaif313 avatar Jun 18 '19 10:06 uzaif313

That should just work with has_many :articles in the serializer. The serializer doesn't need to care where the ORM stores the association.

neongrau avatar Jul 01 '19 14:07 neongrau