From 36feb5d44fce75260759eb6e160c19d2b14d2f17 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 15 May 2013 17:07:04 -0700 Subject: [PATCH] Refactor embeddable? method --- lib/active_model/serializer/associations.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/active_model/serializer/associations.rb b/lib/active_model/serializer/associations.rb index aa77bf63..e2e13c22 100644 --- a/lib/active_model/serializer/associations.rb +++ b/lib/active_model/serializer/associations.rb @@ -95,11 +95,7 @@ module ActiveModel end def embeddable? - if polymorphic? && object.nil? - false - else - true - end + super || !polymorphic? end def serializables