diff options
author | José Valim <jose.valim@gmail.com> | 2009-07-02 11:08:07 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-07-02 11:08:07 +0200 |
commit | ec55e59e993d6c39c6ba8d57d4ef6d270ee8c14f (patch) | |
tree | ee34b3c3bb05c313a160dd51aa2aaab6238c4619 /railties/lib/commands/destroy.rb | |
parent | 776220e1e2a4e523b87511d8bb665f2dcc4981d4 (diff) | |
download | rails-ec55e59e993d6c39c6ba8d57d4ef6d270ee8c14f.tar.gz rails-ec55e59e993d6c39c6ba8d57d4ef6d270ee8c14f.tar.bz2 rails-ec55e59e993d6c39c6ba8d57d4ef6d270ee8c14f.zip |
Updated commands.
Diffstat (limited to 'railties/lib/commands/destroy.rb')
-rw-r--r-- | railties/lib/commands/destroy.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/railties/lib/commands/destroy.rb b/railties/lib/commands/destroy.rb index f4b81d6511..204477b738 100644 --- a/railties/lib/commands/destroy.rb +++ b/railties/lib/commands/destroy.rb @@ -1,6 +1,10 @@ require "#{RAILS_ROOT}/config/environment" -require 'rails_generator' -require 'rails_generator/scripts/destroy' +require 'generators' -ARGV.shift if ['--help', '-h'].include?(ARGV[0]) -Rails::Generator::Scripts::Destroy.new.run(ARGV) +if ARGV.size == 0 + Rails::Generators.help + exit +end + +name = ARGV.shift +Rails::Generators.invoke name, ARGV, :revoke |