From 0d07152aab40da70ad87e0e652931812a80d7bcc Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Wed, 28 Sep 2005 18:07:18 +0000 Subject: 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 --- .../active_record/connection_adapters/abstract/schema_definitions.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index 424a898db3..ffd0359274 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -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 \ No newline at end of file +end -- cgit v1.2.3