mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Make embed nil ids work
This commit is contained in:
@@ -161,7 +161,7 @@ module ActiveModel
|
||||
if associated_data.respond_to?(:to_ary)
|
||||
associated_data.map { |elem| elem.send(association.embed_key) }
|
||||
else
|
||||
associated_data.send(association.embed_key)
|
||||
associated_data.send(association.embed_key) if associated_data
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user