diff options
author | Emilio Tagua <miloops@gmail.com> | 2011-04-14 23:00:28 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2011-04-14 23:05:08 -0300 |
commit | 434d75705f84337c97c2e5360a7586c7373c923b (patch) | |
tree | 29952cb0efd12f81d4cb61e7ab2dda478ecc6207 /railties/lib/rails/commands | |
parent | 3d44e4575825b30dc2407e3c421af23369224a34 (diff) | |
download | rails-434d75705f84337c97c2e5360a7586c7373c923b.tar.gz rails-434d75705f84337c97c2e5360a7586c7373c923b.tar.bz2 rails-434d75705f84337c97c2e5360a7586c7373c923b.zip |
Fix console to accept [environment] [options] as specified in docs.
Diffstat (limited to 'railties/lib/rails/commands')
-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 |