ruby-on-rails – 列出rails应用程序中的可用生成器

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – 列出rails应用程序中的可用生成器前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
如何在Rails应用程序中获取可用的生成器列表,包括那些包含宝石如devise的生成器? (与耙子任务列表的rake -T类似)

解决方法

我知道了.命令是
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
原文链接:https://www.f2er.com/ruby/265916.html

猜你在找的Ruby相关文章