Skip to content
This repository
Browse code

Fix data loading from the performance script

  • Loading branch information...
commit 130bf3c9edf89de78203c02c5f76f9ea2b7b46a5 1 parent 1fcf4e8
Pratik authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  activerecord/examples/performance.rb
2  activerecord/examples/performance.rb
@@ -58,7 +58,7 @@ def self.feel(exhibits) exhibits.each { |e| e.feel } end
58 58
 sqlfile = File.expand_path("../performance.sql", __FILE__)
59 59
 
60 60
 if File.exists?(sqlfile)
61  
-  mysql_bin = %w[mysql mysql5].select { |bin| `which #{bin}`.length > 0 }
  61
+  mysql_bin = %w[mysql mysql5].detect { |bin| `which #{bin}`.length > 0 }
62 62
   `#{mysql_bin} -u #{conn[:username]} #{"-p#{conn[:password]}" unless conn[:password].blank?} #{conn[:database]} < #{sqlfile}`
63 63
 else
64 64
   puts 'Generating data...'

0 notes on commit 130bf3c

Please sign in to comment.
Something went wrong with that request. Please try again.