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
As someone that just finish this painful process the MOST important step is to build enough TESTS to check as much functionality as possible. They should cover not only the model/controller that you plan to rename but also all other models/controllers/views parts. Anyhow it's a good (or maybe even a must) practice.
Do this steps by iterations, sometimes you need to comeback to steps few times (5 and more) to discover additional files that need to be changed. And now for the rename steps:
Corps/Corp to Stores/Store in db/migrate folderTry to run:
rake db:drop:all
rake db:create
rake db:migrate
Change content of db/seeds.rb file.
rake db:seed --trace (In this step you may need to change some other model/controller files.)test/fixtures files. you may need to change not only corps.yml but other related files (some files may include corp_id).TESTOPTS="--seed=1981" or any other number)