LoginSignup
5
5

More than 5 years have passed since last update.

Railsでapi用のcontrollerを作るときに覚えておくといいオプション

Last updated at Posted at 2013-11-19

apiのconttrolerを rails g controller hoge で 作成すると

assets とか helper とかが自動生成されるので、自分の場合、都度消してました。

オプションを確認してみたら

—helper—assets オプションがあるのを先ほど知りました。

rails g controller hogs —helper false —assets false

で作るとhelperとassetsが自動生成されない。

viewは自動的につくられてもしょうがないのかな。

model とか 他の オプションも目を通して見よう。

5
5
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
5
5