aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/destroy.rb
blob: ae354eca97360a6fc81f5ea2e32293c8fa2c6796 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
require 'rails/generators'
require 'active_support/core_ext/object/inclusion'

if ARGV.first.in?([nil, "-h", "--help"])
  Rails::Generators.help 'destroy'
  exit
end

name = ARGV.shift
Rails::Generators.invoke name, ARGV, :behavior => :revoke, :destination_root => Rails.root