diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-16 16:18:00 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-16 16:18:00 -0800 |
commit | 4c1a1933cbc5ab96efe340a3b31ac5fee12c99c8 (patch) | |
tree | c534c03f07537f9cb4b54fd6e79a40f0051860b3 /activerecord | |
parent | bb95e815380c85d14afade807ebb2dd227d90b9e (diff) | |
download | rails-4c1a1933cbc5ab96efe340a3b31ac5fee12c99c8.tar.gz rails-4c1a1933cbc5ab96efe340a3b31ac5fee12c99c8.tar.bz2 rails-4c1a1933cbc5ab96efe340a3b31ac5fee12c99c8.zip |
No need to `readlines` then `join`, just use `read` :heart:
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index ef8f815207..5964fa9cb0 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -414,7 +414,7 @@ db_namespace = namespace :db do when /mysql/ ActiveRecord::Base.establish_connection(abcs[env]) ActiveRecord::Base.connection.execute('SET foreign_key_checks = 0') - IO.readlines("#{Rails.root}/db/structure.sql").join.split("\n\n").each do |table| + IO.read("#{Rails.root}/db/structure.sql").split("\n\n").each do |table| ActiveRecord::Base.connection.execute(table) end when /postgresql/ |