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:
parent
e460aa96ae
commit
f95f0918d7
2 changed files with 0 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue