24

如何获取应用程序中可用的列表generatorsRails包括来自包含的 gem的列表devise?(类似于rake -T的列表rake tasks

4

1 回答 1

39

我知道了。命令是

rails generate

输出是这样的:

Usage: rails generate GENERATOR [args] [options]
General options:
  -h, [--help]     # Print generator's options and usage
  -p, [--pretend]  # Run but do not make any changes
  -f, [--force]    # Overwrite files that already exist
  -s, [--skip]     # Skip files that already exist
  -q, [--quiet]    # Suppress status output

Please choose a generator below.

Rails:
  assets
  controller
  generator
  helper
  inherited_resources_controller
  integration_test
  mailer
  migration
  model
  observer
  performance_test
  resource
  responders_controller
  scaffold
  scaffold_controller
  session_migration
  task

ActiveRecord:
  active_record:devise
  active_record:migration
  active_record:model
  active_record:observer
  active_record:session_migration

Coffee:
  coffee:assets

Devise:
  devise
  devise:install
  devise:views
于 2013-09-02T07:30:47.047 回答