create.js.erb,destroy.js.erb:这些文件如何适合Rails应用程序(create.js.erb, destroy.js.erb: How do these files fit

编程入门 行业动态 更新时间:2024-10-09 08:36:57
create.js.erb,destroy.js.erb:这些文件如何适合Rails应用程序(create.js.erb, destroy.js.erb: How do these files fit in a Rails app)

我无法找到有关create.js.erb和destroy.js.erb如何适合Rails 3应用程序的文档。

应用程序>控制器中这些类型的Javascript文件背后的逻辑是什么? 他们如何以及何时访问?

I haven't been able to find documentation that talk about how create.js.erb and destroy.js.erb fit in a Rails 3 app.

What is the logic behind these types of Javascript files in the app > controllers? How and when are they accessed?

最满意答案

文件扩展名与Mime类型相关联。 在这里查看我的答案。 它是为Rails 2.2.2编写的,但同样的逻辑仍然存在。 请注意,Rails 3中的respond_to语法已更改。 此外,这些文件不在app/controllers ,而是在app/views/<controller_name>/

File extensions are associated with Mime types. Check my answer here. It was written for Rails 2.2.2, but the same logic still holds. Note that the respond_to syntax has changed in Rails 3. Also, these files are not in app/controllers, but in app/views/<controller_name>/

更多推荐

本文发布于:2023-08-04 22:02:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1422327.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   适合   文件   destroy   erb

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!