Method: Rails::Generators.help

Defined in:
railties/lib/rails/generators.rb

.help(command = "generate") ⇒ Object

Show help message with available generators.



170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'railties/lib/rails/generators.rb', line 170

def help(command = "generate")
  puts "Usage:"
  puts "  bin/rails #{command} GENERATOR [args] [options]"
  puts
  puts "General options:"
  puts "  -h, [--help]     # Print generator's options and usage"
  puts "  -p, [--pretend]  # Run but do not make any changes"
  puts "  -f, [--force]    # Overwrite files that already exist"
  puts "  -s, [--skip]     # Skip files that already exist"
  puts "  -q, [--quiet]    # Suppress status output"
  puts
  puts "Please choose a generator below."
  puts

  print_generators
end