This file is indexed.

/usr/lib/ruby/vendor_ruby/rails/commands/destroy.rb is in ruby-railties 2:4.2.6-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
require 'rails/generators'

#if no argument/-h/--help is passed to rails destroy command, then
#it generates the help associated.
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