From 0ac5c03f169b3e3055040e84ca088df134c2bfbb Mon Sep 17 00:00:00 2001 From: Stefan Sprenger Date: Fri, 27 May 2011 13:50:42 +0200 Subject: Add destroy to engine's commands --- railties/lib/rails/engine/commands.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'railties') 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 -- cgit v1.2.3