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