mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
6a728491b6
This basically reverts 618268b4b9
28 lines
618 B
Ruby
28 lines
618 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "rails/generators"
|
|
|
|
module Rails
|
|
module Command
|
|
class DestroyCommand < Base # :nodoc:
|
|
no_commands do
|
|
def help
|
|
require_application_and_environment!
|
|
load_generators
|
|
|
|
Rails::Generators.help self.class.command_name
|
|
end
|
|
end
|
|
|
|
def perform(*)
|
|
generator = args.shift
|
|
return help unless generator
|
|
|
|
require_application_and_environment!
|
|
load_generators
|
|
|
|
Rails::Generators.invoke generator, args, behavior: :revoke, destination_root: Rails::Command.root
|
|
end
|
|
end
|
|
end
|
|
end
|