diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-28 10:40:43 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-28 10:40:43 -0700 |
commit | e001ea09400af589ff629a895a1ae946c6d5ef69 (patch) | |
tree | 9e0d45e6cb6a732ec7118c9d4acb37c9e0adf325 /activerecord/lib/active_record/connection_adapters | |
parent | 9b561ab029f56f3bea61700ffcc7c5c0dd763d25 (diff) | |
download | rails-e001ea09400af589ff629a895a1ae946c6d5ef69.tar.gz rails-e001ea09400af589ff629a895a1ae946c6d5ef69.tar.bz2 rails-e001ea09400af589ff629a895a1ae946c6d5ef69.zip |
no need for splat and flatten
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb index 0571e0cd14..5b2a202b73 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb @@ -360,7 +360,7 @@ module ActiveRecord end def copy_table_contents(from, to, columns, rename = {}) #:nodoc: - column_mappings = Hash[*columns.map {|name| [name, name]}.flatten] + column_mappings = Hash[columns.map {|name| [name, name]}] rename.inject(column_mappings) {|map, a| map[a.last] = a.first; map} from_columns = columns(from).collect {|col| col.name} columns = columns.find_all{|col| from_columns.include?(column_mappings[col])} |