aboutsummaryrefslogtreecommitdiffstats
path: root/lib/active_relation/primitives/attribute.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/active_relation/primitives/attribute.rb')
-rw-r--r--lib/active_relation/primitives/attribute.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/active_relation/primitives/attribute.rb b/lib/active_relation/primitives/attribute.rb
index d815656794..d37271490a 100644
--- a/lib/active_relation/primitives/attribute.rb
+++ b/lib/active_relation/primitives/attribute.rb
@@ -54,6 +54,14 @@ module ActiveRelation
def =~(other)
!(history & other.history).empty?
end
+
+ def %(other)
+ if other
+ (history - other.history) + (other.history - history)
+ else
+ history
+ end
+ end
end
include Congruence