1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Revert "Table#[] returns nil when table does not exist"

This reverts commit e460aa96ae.
This commit is contained in:
Aaron Patterson 2010-09-15 14:46:40 -07:00
parent e460aa96ae
commit f95f0918d7
2 changed files with 0 additions and 9 deletions

View file

@ -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

View file

@ -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