diff options
Diffstat (limited to 'railties/lib/rails/commands.rb')
-rw-r--r-- | railties/lib/rails/commands.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/rails/commands.rb b/railties/lib/rails/commands.rb index 4a082aedb8..5e55aeada9 100644 --- a/railties/lib/rails/commands.rb +++ b/railties/lib/rails/commands.rb @@ -15,15 +15,15 @@ command = aliases[command] || command case command when 'generate', 'destroy', 'plugin' + require 'rails/generators' + if command == 'plugin' && ARGV.first == 'new' require "rails/commands/plugin_new" else require APP_PATH Rails.application.require_environment! - if defined?(ENGINE_PATH) && engine = Rails::Engine.find(ENGINE_PATH) - Rails.application = engine - end + Rails.application.load_generators require "rails/commands/#{command}" end @@ -91,7 +91,7 @@ In addition to those, there are: benchmarker See how fast a piece of code runs profiler Get profile information from a piece of code plugin Install a plugin - runner Run a piece of code in the application environment + runner Run a piece of code in the application environment (short-cut alias: "r") All commands can be run with -h for more information. EOT |