diff options
author | José Valim <jose.valim@gmail.com> | 2010-07-01 17:07:48 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-01 18:43:44 +0200 |
commit | 53b34e84762b7f2d6b641f99dadbb1eab42907ab (patch) | |
tree | 8cb0dd04053a43f2bb9367a672e81061fb2f7fa0 /railties/lib/rails/commands.rb | |
parent | 9024545a6b019e3a2596a4194e84e77963e31b05 (diff) | |
download | rails-53b34e84762b7f2d6b641f99dadbb1eab42907ab.tar.gz rails-53b34e84762b7f2d6b641f99dadbb1eab42907ab.tar.bz2 rails-53b34e84762b7f2d6b641f99dadbb1eab42907ab.zip |
Avoid calls to Rails::Application since this is not the official API.
Your application should *always* reference your application const (as Blog::Application) and Rails.application should be used just internally.
Diffstat (limited to 'railties/lib/rails/commands.rb')
-rw-r--r-- | railties/lib/rails/commands.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/railties/lib/rails/commands.rb b/railties/lib/rails/commands.rb index aad1170b56..b9353ba336 100644 --- a/railties/lib/rails/commands.rb +++ b/railties/lib/rails/commands.rb @@ -13,27 +13,27 @@ command = aliases[command] || command case command when 'generate', 'destroy', 'plugin', 'benchmarker', 'profiler' require APP_PATH - Rails::Application.require_environment! + Rails.application.require_environment! require "rails/commands/#{command}" when 'console' require 'rails/commands/console' require APP_PATH - Rails::Application.require_environment! - Rails::Console.start(Rails::Application) + Rails.application.require_environment! + Rails::Console.start(Rails.application) when 'server' require 'rails/commands/server' Rails::Server.new.tap { |server| require APP_PATH - Dir.chdir(Rails::Application.root) + Dir.chdir(Rails.application.root) server.start } when 'dbconsole' require 'rails/commands/dbconsole' require APP_PATH - Rails::DBConsole.start(Rails::Application) + Rails::DBConsole.start(Rails.application) when 'application', 'runner' require "rails/commands/#{command}" |