mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix console to accept [environment] [options] as specified in docs.
This commit is contained in:
parent
3d44e45758
commit
434d75705f
1 changed files with 1 additions and 1 deletions
|
@ -51,6 +51,6 @@ module Rails
|
|||
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
|
||||
if ARGV.first && !ARGV.first.index("-") && env = ARGV.shift # has to shift the env ARGV so IRB doesn't freak
|
||||
ENV['RAILS_ENV'] = %w(production development test).detect {|e| e =~ /^#{env}/} || env
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue