开发者

Change model name in rails easily

I'm going to need to change one of my model names. Is there anything out the开发者_如何转开发re that will replace every instance of the original model name in the controllers views and tests or do I have to do it all manually, page by page?


Check out RubyMine from JetBrains, they have some good refactoring tools for ruby.


You have to do all manually, page by page. If you have tests, they should give you clear indications of where it is still in use.


Netbeans has this feature, where you can give it a Name you want to change in your entire project and it'll replace it through your entire code base.
Get Netbeans 6.9 beta, the ruby version http://download.netbeans.org/netbeans/6.9/beta/, you just select the model name, right click and pick refactor ... it allows you even preview changes before you run the refactor.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜