mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Implement has_one's embed ids include true
This commit is contained in:
@@ -74,7 +74,8 @@ module ActiveModel
|
||||
self.class._associations.each_with_object({}) do |association, hash|
|
||||
if association.embed_ids?
|
||||
hash[association.key] = serialize_ids association
|
||||
elsif association.embed_objects?
|
||||
end
|
||||
if association.embed_objects?
|
||||
associated_data = send(association.name)
|
||||
hash[association.embedded_key] = association.build_serializer(associated_data).serializable_hash
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user