Permalink
Browse files

No need to `readlines` then `join`, just use `read` ❤️

same as 4c1a193
  • Loading branch information...
arunagw committed Nov 17, 2011
1 parent e367142 commit 5ccd9bcc1a3012573e6ab19ac52abf8917374bea
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/railties/databases.rake
@@ -430,7 +430,7 @@ db_namespace = namespace :db do
`sqlcmd -S #{abcs[env]['host']} -d #{abcs[env]['database']} -U #{abcs[env]['username']} -P #{abcs[env]['password']} -i db\\structure.sql`
when 'oci', 'oracle'
ActiveRecord::Base.establish_connection(abcs[env])
- IO.readlines("#{Rails.root}/db/structure.sql").join.split(";\n\n").each do |ddl|
+ IO.read("#{Rails.root}/db/structure.sql").split(";\n\n").each do |ddl|
ActiveRecord::Base.connection.execute(ddl)
end
when 'firebird'

0 comments on commit 5ccd9bc

Please sign in to comment.