【发布时间】:2011-10-17 18:41:11
【问题描述】:
我有两个问题。
我是否错误地假设我的所有 javascripts 都应该在 rails 3.1 中默认压缩到 application.js 中,即使在开发模式下也是如此?
如果不是,那为什么我的标签有我所有的 30 个 javascript 并且需要永远加载?
我的 application.js 文件如下所示:
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require_tree .
并在浏览器中呈现为:
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
;
虽然我所有的其他 javascript 都已完整呈现。
非常感谢!
【问题讨论】:
标签: ruby-on-rails-3.1 asset-pipeline