diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-30 14:47:37 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-30 14:47:37 -0700 |
commit | bef0d30e30b99c8e56325645a9f643b60ce3dff9 (patch) | |
tree | 98481edd298a8a86cc6aaa7356e46f0fbc0ba091 | |
parent | 19c5a95f1093653d2628dfb2f53637b0425dbba4 (diff) | |
download | rails-bef0d30e30b99c8e56325645a9f643b60ce3dff9.tar.gz rails-bef0d30e30b99c8e56325645a9f643b60ce3dff9.tar.bz2 rails-bef0d30e30b99c8e56325645a9f643b60ce3dff9.zip |
removing Table#== as it is not actually used
-rw-r--r-- | lib/arel/algebra/relations/relation.rb | 2 | ||||
-rw-r--r-- | lib/arel/engines/sql/relations/table.rb | 7 | ||||
-rw-r--r-- | spec/sql/christener_spec.rb | 8 |
3 files changed, 1 insertions, 16 deletions
diff --git a/lib/arel/algebra/relations/relation.rb b/lib/arel/algebra/relations/relation.rb index c6e2727c8f..9b90142de9 100644 --- a/lib/arel/algebra/relations/relation.rb +++ b/lib/arel/algebra/relations/relation.rb @@ -129,7 +129,7 @@ module Arel end def where clause = nil - clause ? Where.new(self, [clause]) : self + clause ? Where.new(self, Array(clause)) : self end def skip thing = nil diff --git a/lib/arel/engines/sql/relations/table.rb b/lib/arel/engines/sql/relations/table.rb index 8266897098..35b6b5ce5c 100644 --- a/lib/arel/engines/sql/relations/table.rb +++ b/lib/arel/engines/sql/relations/table.rb @@ -82,13 +82,6 @@ module Arel @columns = nil @attributes = Header.new([]) end - - def ==(other) - super || - Table === other && - name == other.name && - table_alias == other.table_alias - end end end diff --git a/spec/sql/christener_spec.rb b/spec/sql/christener_spec.rb index d50cb56261..895ec2a9b6 100644 --- a/spec/sql/christener_spec.rb +++ b/spec/sql/christener_spec.rb @@ -3,14 +3,6 @@ require 'spec_helper' module Arel module Sql describe "Christener" do - it "returns the same name with two table objects" do - christener = Christener.new - table = Table.new 'users' - table2 = Table.new 'users' - christener.name_for(table).should == 'users' - christener.name_for(table2).should == 'users' - end - it "returns the first name" do christener = Christener.new table = Table.new 'users' |