From 2e11213d62f25d41ccf77b3d0f5b69aad0bf165b Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Sun, 16 Jan 2011 07:47:41 +0900 Subject: "rails dbconsole t" must not load "production" but "test" [#6293 state:committed] Signed-off-by: Santiago Pastorino --- railties/lib/rails/commands/dbconsole.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/commands/dbconsole.rb b/railties/lib/rails/commands/dbconsole.rb index 300fd6da05..9dbc1699ee 100644 --- a/railties/lib/rails/commands/dbconsole.rb +++ b/railties/lib/rails/commands/dbconsole.rb @@ -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 -- cgit v1.2.3