aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2005-09-28 18:07:18 +0000
committerMarcel Molina <marcel@vernix.org>2005-09-28 18:07:18 +0000
commit0d07152aab40da70ad87e0e652931812a80d7bcc (patch)
tree3e5a3fa0ed119a3e3233d1a0c2e9e61a316d4038 /activerecord
parentf43d97a860de396d4f087c122d8e4f714aaed42c (diff)
downloadrails-0d07152aab40da70ad87e0e652931812a80d7bcc.tar.gz
rails-0d07152aab40da70ad87e0e652931812a80d7bcc.tar.bz2
rails-0d07152aab40da70ad87e0e652931812a80d7bcc.zip
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
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb4
1 files changed, 2 insertions, 2 deletions
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