rails--rails/railties/lib/rails/commands/destroy.rb

11 lines
276 B
Ruby

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