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.
我有一个名为Corners.js的 js 供应商脚本,位于 /vendor/assets/javascripts/ 如何包含 js 供应商脚本?
只包括
//= require Corners.js
在 application.js 中并让 Rails 为您完成工作(它自动包含供应商/资产)。
如果您只是创建vendor/assets/javascripts目录,则需要重新启动 Rails 服务器。
vendor/assets/javascripts