blob: 8a6fe67f77d9d4fcb8d398b50122014a3b88fb19 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
require_relative "../../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
|