Permalink
Browse files

schema cache already has the columns as a hash, so use that

  • Loading branch information...
1 parent 978ec98 commit 51676652a3568ad09b06385564de4fdcb13af05e @tenderlove tenderlove committed Nov 26, 2012
View
2 activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
@@ -266,7 +266,7 @@ def reset_sequence!(table, column, sequence = nil)
# Inserts the given fixture into the table. Overridden in adapters that require
# something beyond a simple insert (eg. Oracle).
def insert_fixture(fixture, table_name)
- columns = Hash[schema_cache.columns[table_name].map { |c| [c.name, c] }]
+ columns = schema_cache.columns_hash(table_name)
key_list = []
value_list = fixture.map do |name, value|

0 comments on commit 5167665

Please sign in to comment.