LoginSignup
6
6

More than 5 years have passed since last update.

Ruby on Railsのgeneratorのヘルプ

Posted at

いつもググってばかりいたのですが一覧を出す方法をやっと知りました(-ω-)

rake -Tみたいなのですね。

$ rails g -h
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
   :

です。

コマンドにも指定できて詳細なヘルプが出ます。

$ rails g controller -h
Usage:
  rails generate controller NAME [action action] [options]

Options:
      [--skip-namespace]        # Skip namespace (affects only isolated applications)
      [--old-style-hash]        # Force using old style hash (:foo => 'bar') on Ruby >= 1.9
   :

今更な自分に涙目…

6
6
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6