Skip to content

Commit

Permalink
Fix data loading from the performance script
Browse files Browse the repository at this point in the history
  • Loading branch information
lifo committed Jul 16, 2010
1 parent 1fcf4e8 commit 130bf3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/examples/performance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def self.feel(exhibits) exhibits.each { |e| e.feel } end
sqlfile = File.expand_path("../performance.sql", __FILE__)

if File.exists?(sqlfile)
mysql_bin = %w[mysql mysql5].select { |bin| `which #{bin}`.length > 0 }
mysql_bin = %w[mysql mysql5].detect { |bin| `which #{bin}`.length > 0 }
`#{mysql_bin} -u #{conn[:username]} #{"-p#{conn[:password]}" unless conn[:password].blank?} #{conn[:database]} < #{sqlfile}`
else
puts 'Generating data...'
Expand Down

0 comments on commit 130bf3c

Please sign in to comment.