I have a few models in Rails that look something like this:
class Issue < ActiveRecord::Base
belongs_to :reporter, class_name: \'User\'
belongs_to :assign
I had similar problem and have found solution at ActiveModel::Serializers readme. You can use :root
option. Try something like this for issue serializer:
class IssueSerializer < ActiveModel::Serializer
attributes :id
embed :ids, include: true
has_one :reporter, :root => "users"
has_one :assignee, :root => "users"
has_many :comments
end