Permalink
Browse files

Merge pull request #3656 from arunagw/readline_to_read

No need to `readlines` then `join`, just use `read` ❤️
  • Loading branch information...
2 parents e367142 + 5ccd9bc commit 4148a7ca7dc3f8c2a368068eb248d231aa096b41 @vijaydev vijaydev committed Nov 17, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/railties/databases.rake
View
2 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 4148a7c

Please sign in to comment.