diff --git a/lib/arel/table.rb b/lib/arel/table.rb index c381613515..06bbe7b99e 100644 --- a/lib/arel/table.rb +++ b/lib/arel/table.rb @@ -88,8 +88,6 @@ module Arel end def [] name - return nil unless @engine.connection.table_exists?(@name) - name = name.to_sym columns.find { |column| column.name == name } end diff --git a/spec/arel/table_spec.rb b/spec/arel/table_spec.rb index 9c84b170a2..5b68040aac 100644 --- a/spec/arel/table_spec.rb +++ b/spec/arel/table_spec.rb @@ -147,13 +147,6 @@ module Arel end end - describe 'when table does not exist' do - it 'returns nil' do - table = Table.new(:foooo) - table[:id].should be_nil - end - end - ### FIXME: this seems like a bad requirement. #describe 'when given an', Attribute do # it "returns the attribute if the attribute is within the relation" do