diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/engine/commands.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/railties/lib/rails/engine/commands.rb b/railties/lib/rails/engine/commands.rb index b77fef8ffd..59b7c4d67f 100644 --- a/railties/lib/rails/engine/commands.rb +++ b/railties/lib/rails/engine/commands.rb @@ -13,10 +13,10 @@ require ENGINE_PATH engine = ::Rails::Engine.find(ENGINE_ROOT) case command -when 'generate' +when 'generate', 'destroy' require 'rails/generators' engine.load_generators - require 'rails/commands/generate' + require "rails/commands/#{command}" when '--version', '-v' ARGV.unshift '--version' @@ -29,6 +29,7 @@ Usage: rails COMMAND [ARGS] The common rails commands available for engines are: generate Generate new code (short-cut alias: "g") + destroy Undo code generated with "generate" All commands can be run with -h for more information. EOT |