Skip to content

Commit

Permalink
"rails console t" must not load "production" but "test" [#5527 state:…
Browse files Browse the repository at this point in the history
…resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information
amatsuda authored and josevalim committed Sep 2, 2010
1 parent 36e625d commit 3e931b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion railties/lib/rails/commands/console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ def start

# 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

0 comments on commit 3e931b1

Please sign in to comment.