Skip to content
This repository
Browse code

Merged pull request #279 from miloops/434d757.

Fix console to accept [environment] [options] as specified in docs.
  • Loading branch information...
commit e36befbdd7df5a44bdea152245632a8a21cdb5d3 2 parents 91bd195 + 434d757
José Valim authored April 26, 2011

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  railties/lib/rails/commands/console.rb
2  railties/lib/rails/commands/console.rb
@@ -51,6 +51,6 @@ def start
51 51
 end
52 52
 
53 53
 # Has to set the RAILS_ENV before config/application is required
54  
-if ARGV.first && !ARGV.first.index("-") && env = ARGV.pop # has to pop the env ARGV so IRB doesn't freak
  54
+if ARGV.first && !ARGV.first.index("-") && env = ARGV.shift # has to shift the env ARGV so IRB doesn't freak
55 55
   ENV['RAILS_ENV'] = %w(production development test).detect {|e| e =~ /^#{env}/} || env
56 56
 end

0 notes on commit e36befb

Please sign in to comment.
Something went wrong with that request. Please try again.