aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/examples
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2010-09-29 13:23:05 -0300
committerJosé Valim <jose.valim@gmail.com>2010-09-29 20:29:51 +0200
commit61cf11247bfdb243625cda93fb08afaacebe1381 (patch)
tree228a1b90b2fb5bfdc77f6184c6120ec68fbb0c3b /activerecord/examples
parentd2ea2e1d5f0964866c4e333a4128049df8927d63 (diff)
downloadrails-61cf11247bfdb243625cda93fb08afaacebe1381.tar.gz
rails-61cf11247bfdb243625cda93fb08afaacebe1381.tar.bz2
rails-61cf11247bfdb243625cda93fb08afaacebe1381.zip
Use detect instead select to avoid "sh: [mysqldump]: command not found".
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/examples')
-rw-r--r--activerecord/examples/performance.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/examples/performance.rb b/activerecord/examples/performance.rb
index ccd60c6c69..c4ce361b5d 100644
--- a/activerecord/examples/performance.rb
+++ b/activerecord/examples/performance.rb
@@ -88,7 +88,7 @@ else
)
end
- mysqldump_bin = %w[mysqldump mysqldump5].select { |bin| `which #{bin}`.length > 0 }
+ mysqldump_bin = %w[mysqldump mysqldump5].detect { |bin| `which #{bin}`.length > 0 }
`#{mysqldump_bin} -u #{conn[:username]} #{"-p#{conn[:password]}" unless conn[:password].blank?} #{conn[:database]} exhibits users > #{sqlfile}`
end