diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-28 15:27:18 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-28 15:27:18 -0700 |
commit | 60b8a98c15186429a9bf216dbbae0f3b71b666bd (patch) | |
tree | c02cf020ab070bdb59b877bc9dd532ee3efd2fe2 | |
parent | ea1d050266e76d0200f8ff749e537fc66c17ff4f (diff) | |
download | rails-60b8a98c15186429a9bf216dbbae0f3b71b666bd.tar.gz rails-60b8a98c15186429a9bf216dbbae0f3b71b666bd.tar.bz2 rails-60b8a98c15186429a9bf216dbbae0f3b71b666bd.zip |
implementing hash is a non-requirement
-rw-r--r-- | lib/arel/engines/sql/relations/table.rb | 8 | ||||
-rw-r--r-- | spec/engines/sql/unit/relations/table_spec.rb | 7 |
2 files changed, 0 insertions, 15 deletions
diff --git a/lib/arel/engines/sql/relations/table.rb b/lib/arel/engines/sql/relations/table.rb index d9ff95265b..28c56a6bb0 100644 --- a/lib/arel/engines/sql/relations/table.rb +++ b/lib/arel/engines/sql/relations/table.rb @@ -73,14 +73,6 @@ module Arel end end - def eql?(other) - self == other - end - - def hash - @hash ||= :name.hash - end - def column_for(attribute) has_attribute?(attribute) and columns.detect { |c| c.name == attribute.name.to_s } end diff --git a/spec/engines/sql/unit/relations/table_spec.rb b/spec/engines/sql/unit/relations/table_spec.rb index 6afd9964a4..1a0914006b 100644 --- a/spec/engines/sql/unit/relations/table_spec.rb +++ b/spec/engines/sql/unit/relations/table_spec.rb @@ -108,13 +108,6 @@ module Arel end end - describe 'hashing' do - it "implements hash equality" do - Table.new(:users).should hash_the_same_as(Table.new(:users)) - Table.new(:users).should_not hash_the_same_as(Table.new(:photos)) - end - end - describe '#engine' do it "defaults to global engine" do Table.engine = engine = Sql::Engine.new |