aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/primitives
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-05-13 16:53:36 -0700
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-05-13 16:53:36 -0700
commit16730fdbd0ab630320aba225314aa6a1a3b450fe (patch)
treea92ac069bb47e68b3061113c6557ffb72b21071c /lib/arel/primitives
parent562a0bf634bd61f61ebb0145d7626fb484e13c53 (diff)
downloadrails-16730fdbd0ab630320aba225314aa6a1a3b450fe.tar.gz
rails-16730fdbd0ab630320aba225314aa6a1a3b450fe.tar.bz2
rails-16730fdbd0ab630320aba225314aa6a1a3b450fe.zip
fixed defect in alias
Diffstat (limited to 'lib/arel/primitives')
-rw-r--r--lib/arel/primitives/attribute.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/arel/primitives/attribute.rb b/lib/arel/primitives/attribute.rb
index 39de11be26..5f8618ddfc 100644
--- a/lib/arel/primitives/attribute.rb
+++ b/lib/arel/primitives/attribute.rb
@@ -46,6 +46,14 @@ module Arel
end
module Transformations
+ def self.included(klass)
+ alias_method :eql?, :==
+ end
+
+ def hash
+ name.hash + history.size.hash
+ end
+
def as(aliaz = nil)
Attribute.new(relation, name, :alias => aliaz, :ancestor => self)
end