Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 5655

Show
Ignore:
Timestamp:
12/01/06 00:08:33 (2 years ago)
Author:
david
Message:

Added one-letter aliases for the three default environments to script/console, so script/console p will load the production environment (t for test, d for development) [DHH]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/railties/CHANGELOG

    r5652 r5655  
    11*SVN* 
     2 
     3* Added one-letter aliases for the three default environments to script/console, so script/console p will load the production environment (t for test, d for development) [DHH] 
    24 
    35* Fixed that script/server running against Mongrel should tail the proper log regardless of the environment [DHH] 
  • trunk/railties/lib/commands/console.rb

    r4502 r5655  
    1616libs << " -r console_with_helpers" 
    1717 
    18 ENV['RAILS_ENV'] = ARGV.first || ENV['RAILS_ENV'] || 'development' 
     18ENV['RAILS_ENV'] = case ARGV.first 
     19  when "p": "production" 
     20  when "d": "development" 
     21  when "t": "test" 
     22  else 
     23    ARGV.first || ENV['RAILS_ENV'] || 'development' 
     24end 
     25 
    1926if options[:sandbox] 
    2027  puts "Loading #{ENV['RAILS_ENV']} environment in sandbox."