From 86550ef2bee377a5e4134dc63dedb138bb9ab7dc Mon Sep 17 00:00:00 2001 From: Nick Kallen Date: Sun, 2 Mar 2008 17:05:06 -0800 Subject: new concept of session boundaries --- lib/active_relation/primitives/attribute.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/active_relation/primitives') diff --git a/lib/active_relation/primitives/attribute.rb b/lib/active_relation/primitives/attribute.rb index 75f19605c7..a72acb0c34 100644 --- a/lib/active_relation/primitives/attribute.rb +++ b/lib/active_relation/primitives/attribute.rb @@ -49,13 +49,10 @@ module ActiveRelation def self.included(klass) klass.class_eval do alias_method :eql?, :== + delegate :hash, :to => :name end end - def hash - relation.hash + name.hash - end - def history [self] + (ancestor ? [ancestor, ancestor.send(:history)].flatten : []) end -- cgit v1.2.3