diff options
Diffstat (limited to 'lib/arel/primitives')
-rw-r--r-- | lib/arel/primitives/attribute.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/arel/primitives/attribute.rb b/lib/arel/primitives/attribute.rb index 9fb47d56cf..1de2bf7cb0 100644 --- a/lib/arel/primitives/attribute.rb +++ b/lib/arel/primitives/attribute.rb @@ -39,6 +39,11 @@ module Arel def original_relation relation.relation_for(self) + # root.relation + end + + def original_attribute + original_relation[self] end module Transformations @@ -85,6 +90,7 @@ module Arel if other then (history & other.history).size.to_f / Set.new(history + other.history).size else 0 end + # 1 / (history.index(other) || -1) end end include Congruence |