How to rename rails controller and model in a project

后端 未结 8 1065
遥遥无期
遥遥无期 2020-11-29 17:39

I started a Rails app and everything works fine. But now, I would like to rename a controller and the associated model:

I wanted to change the Corps con

8条回答
  •  囚心锁ツ
    2020-11-29 18:10

    for controller you will have to make change in following places if you're doing it manually:

    • route
    • app/views
    • app/controllers
    • test/controllers
    • app/helper
    • app/assets/javascripts/
    • app/assets/stylesheets/

    for model, Nobita's answer is pretty good

提交回复
热议问题