Rails:重命名控制器和相应的模型 [英] Rails: renaming a controller and corresponding model

查看:56
本文介绍了Rails:重命名控制器和相应的模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种简单的方法可以重命名我的应用程序中的控制器和模型以及相应代码中的所有实例?

Is there an easy way to rename a controller and model in my app and all the instances in the corresponding code?

我正在使用 textmate,这会像使用替换功能并将 Post 替换为 Report 一样简单吗?

I'm using textmate, would this be as simple as using the replace function and replacing the word Post with Report?

推荐答案

如果您使用的是 textmate,请使用command-shift-f"在整个项目中查找字符串.

If you are using textmate, use 'command-shift-f" to look for a string throughout your entire project.

这篇关于Rails:重命名控制器和相应的模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆