From 65e419c172217f9747e2e56b36fcc4b6089a0d6d Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Mon, 18 May 2009 01:25:09 -0400 Subject: Expand usages of #hash_on. The #hash definition it produces looks broken, but leaving it for now --- lib/arel/engines/sql/relations/table.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/arel/engines') 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 -- cgit v1.2.3