From 7cf10ebc28eea91f98b2e3a17faa256a8f801860 Mon Sep 17 00:00:00 2001 From: Alex Kalderimis <alex.kalderimis@gmail.com> Date: Wed, 13 May 2020 14:09:48 -0400 Subject: [PATCH] StaticModel equality simplification --- lib/static_model.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/static_model.rb b/lib/static_model.rb index 86bf8d62f9af..27805817f4d0 100644 --- a/lib/static_model.rb +++ b/lib/static_model.rb @@ -40,10 +40,6 @@ def destroyed? end def ==(other) - if other.is_a? ::StaticModel - id == other.id - else - super - end + other.present? && other.is_a?(self.class) && id == other.id end end -- GitLab