Question

I have a Rails 3 controller which is not pluralized (IphoneUser) - it already has some controller methods, and a model generated.

However I'd like now rather than when it gets too late into the game, to pluralize it. What's the best way to pluralize this controller without a nightmare of 1-by-1 guess and checks?

Was it helpful?

Solution

You should just need to rename the controller, it's class name, it's views folder, its helper and its functional tests. The only other option is to use the rails generator to destroy it rails destroy and then recreate it named properly. I'd just copy the controller methods and paste them into the new file. rails destroy won't affect your model.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top