aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/engines
diff options
context:
space:
mode:
authorBryan Helmkamp <bryan@brynary.com>2009-05-18 01:25:09 -0400
committerBryan Helmkamp <bryan@brynary.com>2009-05-18 01:25:09 -0400
commit65e419c172217f9747e2e56b36fcc4b6089a0d6d (patch)
treee68865661fba3eef0731c9885d3c3ba5fe45944c /lib/arel/engines
parent930c9f90a03729bdc380ab84882a118d8c17e54d (diff)
downloadrails-65e419c172217f9747e2e56b36fcc4b6089a0d6d.tar.gz
rails-65e419c172217f9747e2e56b36fcc4b6089a0d6d.tar.bz2
rails-65e419c172217f9747e2e56b36fcc4b6089a0d6d.zip
Expand usages of #hash_on. The #hash definition it produces looks broken, but leaving it for now
Diffstat (limited to 'lib/arel/engines')
-rw-r--r--lib/arel/engines/sql/relations/table.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/arel/engines/sql/relations/table.rb b/lib/arel/engines/sql/relations/table.rb
index 0b6574eedc..dd22f44226 100644
--- a/lib/arel/engines/sql/relations/table.rb
+++ b/lib/arel/engines/sql/relations/table.rb
@@ -4,7 +4,6 @@ module Arel
cattr_accessor :engine
attr_reader :name, :engine
- hash_on :name
def initialize(name, engine = Table.engine)
@name, @engine = name.to_s, engine
@@ -16,6 +15,14 @@ module Arel
end
end
+ def eql?(other)
+ self == other
+ end
+
+ def hash
+ @hash ||= :name.hash
+ end
+
def format(attribute, value)
attribute.column.type_cast(value)
end