diff --git a/lib/active_model/serializer.rb b/lib/active_model/serializer.rb index c202610e7..ef47178bd 100644 --- a/lib/active_model/serializer.rb +++ b/lib/active_model/serializer.rb @@ -361,7 +361,7 @@ def serializable_hash _serializable_hash end - include_associations! if _embed + include_associations! if @object.present? && _embed @node end