diff options
author | Akira Matsuda <ronnie@dio.jp> | 2010-09-02 12:05:34 +0900 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-02 11:50:31 +0200 |
commit | 4d9b2da5f3e931db6293489ecbbc7ac07857a7cb (patch) | |
tree | 96aef2a7161143c3a2615210136bb7f343820be4 /railties/lib | |
parent | 920765c4c223ee951312e371722b812710463677 (diff) | |
download | rails-4d9b2da5f3e931db6293489ecbbc7ac07857a7cb.tar.gz rails-4d9b2da5f3e931db6293489ecbbc7ac07857a7cb.tar.bz2 rails-4d9b2da5f3e931db6293489ecbbc7ac07857a7cb.zip |
"rails console t" must not load "production" but "test"
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/commands/console.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |