Rails: renaming a controller and corresponding model

前端 未结 5 894
南笙
南笙 2021-01-21 07:27

Is there an easy way to rename a controller and model in my app and all the instances in the corresponding code?

I\'m using textmate, would this be as simple as using t

5条回答
  •  [愿得一人]
    2021-01-21 07:55

    Yes and no. You can rename it that way, but you'll also need to rename the files as well or Rails won't know where to look for the files corresponding to the new Report model/controller/etc.

提交回复
热议问题