mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 22:36:50 +00:00
Refactor embeddable? method
This commit is contained in:
parent
bbd3c8b157
commit
36feb5d44f
@ -95,11 +95,7 @@ module ActiveModel
|
|||||||
end
|
end
|
||||||
|
|
||||||
def embeddable?
|
def embeddable?
|
||||||
if polymorphic? && object.nil?
|
super || !polymorphic?
|
||||||
false
|
|
||||||
else
|
|
||||||
true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def serializables
|
def serializables
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user