Skip to content
This repository
Browse code

each works well too

  • Loading branch information...
commit ede0466d13a04a9ee609e09a54ae55c06228875c 1 parent bf388f3
Aaron Patterson authored
2  activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
@@ -361,7 +361,7 @@ def copy_table_indexes(from, to, rename = {}) #:nodoc:
361 361
 
362 362
         def copy_table_contents(from, to, columns, rename = {}) #:nodoc:
363 363
           column_mappings = Hash[columns.map {|name| [name, name]}]
364  
-          rename.inject(column_mappings) {|map, a| map[a.last] = a.first; map}
  364
+          rename.each { |a| column_mappings[a.last] = a.first }
365 365
           from_columns = columns(from).collect {|col| col.name}
366 366
           columns = columns.find_all{|col| from_columns.include?(column_mappings[col])}
367 367
           quoted_columns = columns.map { |col| quote_column_name(col) } * ','

0 notes on commit ede0466

Please sign in to comment.
Something went wrong with that request. Please try again.