mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
add guard against including associations for nil objects
This commit is contained in:
parent
b2dc2598fb
commit
82a870d9dc
@ -361,7 +361,7 @@ module ActiveModel
|
|||||||
_serializable_hash
|
_serializable_hash
|
||||||
end
|
end
|
||||||
|
|
||||||
include_associations! if _embed
|
include_associations! if @object.present? && _embed
|
||||||
@node
|
@node
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user