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

10 lines
230 B
Ruby

require 'rails/generators'
if [nil, "-h", "--help"].include?(ARGV.first)
Rails::Generators.help 'destroy'
exit
end
name = ARGV.shift
Rails::Generators.invoke name, ARGV, :behavior => :revoke, :destination_root => Rails.root