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.
在使用 Rails 3.2 构建仅响应 JSON 格式的 HTTP API 时,我应该关闭 Asset Pipeline 和 javascript 文件之类的东西吗?
如果是这样,如何正确地做而不是手动删除听起来很脏的东西?
如果您只提供 api,这可能是个好主意,方法如下:
rails new appname --skip-sprockets
对于现有应用程序,在您的 application.rb 中:
config.assets.enabled = false