Browse files

Add destroy to engine's commands

  • Loading branch information...
Stefan Sprenger
Stefan Sprenger committed May 27, 2011
1 parent e38d375 commit 0ac5c03f169b3e3055040e84ca088df134c2bfbb
Showing with 3 additions and 2 deletions.
  1. +3 −2 railties/lib/rails/engine/commands.rb
@@ -13,10 +13,10 @@
engine = ::Rails::Engine.find(ENGINE_ROOT)
case command
-when 'generate'
+when 'generate', 'destroy'
require 'rails/generators'
- require 'rails/commands/generate'
+ require "rails/commands/#{command}"
when '--version', '-v'
ARGV.unshift '--version'
@@ -29,6 +29,7 @@
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.

0 comments on commit 0ac5c03

Please sign in to comment.