Sha256: 0ac2598eac25c8edea8c73b51c646abd57667fe87e17437a4c1ada66d3c7c63f

Contents?: true

Size: 660 Bytes

Versions: 39

Compression:

Stored size: 660 Bytes

Contents

# frozen_string_literal: true

require "rails/generators"

module Rails
  module Command
    class DestroyCommand < Base # :nodoc:
      no_commands do
        def help
          boot_application!
          load_generators

          Rails::Generators.help self.class.command_name
        end
      end

      desc "destroy GENERATOR", "Remove code generated by `bin/rails generate`"
      def perform(*)
        generator = args.shift
        return help unless generator

        boot_application!
        load_generators

        Rails::Generators.invoke generator, args, behavior: :revoke, destination_root: Rails::Command.root
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 5 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/railties-7.1.3.4/lib/rails/commands/destroy/destroy_command.rb
railties-8.0.1 lib/rails/commands/destroy/destroy_command.rb
railties-8.0.0.1 lib/rails/commands/destroy/destroy_command.rb
railties-7.2.2.1 lib/rails/commands/destroy/destroy_command.rb
railties-7.1.5.1 lib/rails/commands/destroy/destroy_command.rb
railties-8.0.0 lib/rails/commands/destroy/destroy_command.rb
railties-7.2.2 lib/rails/commands/destroy/destroy_command.rb
railties-7.1.5 lib/rails/commands/destroy/destroy_command.rb
railties-8.0.0.rc2 lib/rails/commands/destroy/destroy_command.rb
railties-7.2.1.2 lib/rails/commands/destroy/destroy_command.rb
railties-7.1.4.2 lib/rails/commands/destroy/destroy_command.rb
railties-8.0.0.rc1 lib/rails/commands/destroy/destroy_command.rb
railties-7.2.1.1 lib/rails/commands/destroy/destroy_command.rb
railties-7.1.4.1 lib/rails/commands/destroy/destroy_command.rb
railties-8.0.0.beta1 lib/rails/commands/destroy/destroy_command.rb
omg-railties-8.0.0.alpha9 lib/rails/commands/destroy/destroy_command.rb
omg-railties-8.0.0.alpha8 lib/rails/commands/destroy/destroy_command.rb
omg-railties-8.0.0.alpha7 lib/rails/commands/destroy/destroy_command.rb
omg-railties-8.0.0.alpha4 lib/rails/commands/destroy/destroy_command.rb
omg-railties-8.0.0.alpha3 lib/rails/commands/destroy/destroy_command.rb