Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
"xyz.text.erb"我的文件夹中有一个文件view。我想编辑该内容。就像我是管理员一样,xyz.text.erb当我单击保存然后更改文件内容时,我想在编辑器中编辑该文件内容xyz.text.erb。我怎样才能做到这一点?
"xyz.text.erb"
view
xyz.text.erb
您不能这样做,因为如果您在启动服务器 rails 后更改文件的内容,rails 不会重新加载文件,因此您必须将内容放入数据库中。
开发中的 Rails 每次都会重新加载所有文件,但在生产中,您可以删除所有文件夹应用程序,应用程序继续运行而不会出现任何问题。