Closed
Description
Version: 0.10.6
- Expect the ID of the relationship to first be read from the serializer, then the object.
There is no issue on 0.10.4
I can help whip up a PR soon, just don't have the time at this moment. Figured you could fix this pretty quick (if it's a bug).
module Api
module V1
class QuoteSerializer < ActiveModel::Serializer
attributes :id, ...
...
# uses friendly_id gem
belongs_to :adventure,
serializer: Api::V1::AdventureSerializer
...
end
end
end
module Api
module V1
class AdventureSerializer < ActiveModel::Serializer
attributes :id, ...
...
def id
object.to_param
end
...
end
end
end
Thanks!
Metadata
Metadata
Assignees
Labels
No labels