From 4d9b2da5f3e931db6293489ecbbc7ac07857a7cb Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 2 Sep 2010 12:05:34 +0900 Subject: "rails console t" must not load "production" but "test" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- railties/lib/rails/commands/console.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib') diff --git a/railties/lib/rails/commands/console.rb b/railties/lib/rails/commands/console.rb index 834a120c01..de2f190ad5 100644 --- a/railties/lib/rails/commands/console.rb +++ b/railties/lib/rails/commands/console.rb @@ -48,5 +48,5 @@ end # Has to set the RAILS_ENV before config/application is required if ARGV.first && !ARGV.first.index("-") && env = ARGV.pop # has to pop the env ARGV so IRB doesn't freak - 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