Permalink
Browse files

Make schema definition column lookups agnostic w/r/t/ whether a key o…

…r symbol is passed. Fixes failing test in [2396].

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2397 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent f43d97a commit 0d07152aab40da70ad87e0e652931812a80d7bcc Marcel Molina committed Sep 28, 2005
View
4 activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -160,7 +160,7 @@ def primary_key(name)
# 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 @@ def native
end
end
end
-end
+end

0 comments on commit 0d07152

Please sign in to comment.