"rails dbconsole t" must not load "production" but "test"

[#6293 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
This commit is contained in:
Akira Matsuda
2011-01-16 07:47:41 +09:00
committed by Santiago Pastorino
parent 57bc25c5f8
commit 2e11213d62

View File

@@ -119,5 +119,5 @@ end
# Has to set the RAILS_ENV before config/application is required
if ARGV.first && !ARGV.first.index("-") && env = ARGV.first
ENV['RAILS_ENV'] = %w(production development test).find { |e| e.index(env) } || env
ENV['RAILS_ENV'] = %w(production development test).detect {|e| e =~ /^#{env}/} || env
end