mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 23:06:50 +00:00
embedded_in_root_associations is always defined
This commit is contained in:
parent
c001e964fe
commit
882dbafa7e
@ -44,10 +44,7 @@ module ActiveModel
|
|||||||
|
|
||||||
def embedded_in_root_associations
|
def embedded_in_root_associations
|
||||||
@object.each_with_object({}) do |item, hash|
|
@object.each_with_object({}) do |item, hash|
|
||||||
serializer = serializer_for(item)
|
hash.merge!(serializer_for(item).embedded_in_root_associations)
|
||||||
if serializer.respond_to?(:embedded_in_root_associations)
|
|
||||||
hash.merge!(serializer.embedded_in_root_associations)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user