Reputation: 379
Lots out there about changing model names only or mapping new models to existing tables, but nothing about renaming both at the same time. For now, I'm starting with the DB table and working my way out with Find/Replace in my code, but I'm surprised there isn't something better or at least someone who's tried it and written about it.
Upvotes: 6
Views: 2121
Reputation: 19239
The full list of things to rename are:
You should write a migration for the database changes. The rest can be done easily, or you can use your IDE (RadRails/RubyMine) to help. I guess there's no built in function because there's no way to know where in your code you've used the model.
Upvotes: 13