2
0

More than 3 years have passed since last update.

rails d controller コマンド

Posted at

指定したコントローラーを削除するコマンドです。

削除したいコントローラー名を後ろにつけて以下のように使用します。

$ rails d controller コントローラー名

###rails d controllerのdとは「destroy」を省略したもの

###例えば messagescontrollerだと

$ rails d controller messages

このコマンドで削除を実行すると、コントローラーを作成した際に自動的に作られた関連ファイルも同時に削除されるので非常に便利ですね。

2
0
0

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
2
0