Skip to content
Browse files

Add destroy to engine's commands

  • Loading branch information...
1 parent e38d375 commit 0ac5c03f169b3e3055040e84ca088df134c2bfbb Stefan Sprenger committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 railties/lib/rails/engine/commands.rb
View
5 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'
engine.load_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.
EOT

0 comments on commit 0ac5c03

Please sign in to comment.
Something went wrong with that request. Please try again.