mirror of
https://github.com/github/rails.git
synced 2026-04-04 03:00:58 -04:00
Make schema definition column lookups agnostic w/r/t/ whether a key or symbol is passed. Fixes failing test in [2396].
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2397 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -160,7 +160,7 @@ module ActiveRecord
|
||||
|
||||
# Returns a ColumnDefinition for the column with name +name+.
|
||||
def [](name)
|
||||
@columns.find {|column| column.name == name}
|
||||
@columns.find {|column| column.name.to_s == name.to_s}
|
||||
end
|
||||
|
||||
# Instantiates a new column for the table.
|
||||
@@ -216,4 +216,4 @@ module ActiveRecord
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user