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