diff options
author | José Valim <jose.valim@gmail.com> | 2011-04-26 11:15:42 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-04-26 11:15:42 -0700 |
commit | e36befbdd7df5a44bdea152245632a8a21cdb5d3 (patch) | |
tree | 1ac10c153858379c052b59c4fe1fe170a175bb3b /railties/lib | |
parent | 91bd1951cc3d699729506fc2cec5bc6a43673b90 (diff) | |
parent | 434d75705f84337c97c2e5360a7586c7373c923b (diff) | |
download | rails-e36befbdd7df5a44bdea152245632a8a21cdb5d3.tar.gz rails-e36befbdd7df5a44bdea152245632a8a21cdb5d3.tar.bz2 rails-e36befbdd7df5a44bdea152245632a8a21cdb5d3.zip |
Merged pull request #279 from miloops/434d757.
Fix console to accept [environment] [options] as specified in docs.
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 2b7faf9715..dfd3c654ff 100644 --- a/railties/lib/rails/commands/console.rb +++ b/railties/lib/rails/commands/console.rb @@ -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 |