Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
76c42383
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
76c42383
编写于
2月 07, 2016
作者:
J
Jon Moss
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #23531 from coldnebo/docfix
doc changes to clarify asset pipeline
上级
15f6ad3a
5015215f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
3 deletion
+6
-3
guides/source/asset_pipeline.md
guides/source/asset_pipeline.md
+4
-1
guides/source/working_with_javascript_in_rails.md
guides/source/working_with_javascript_in_rails.md
+2
-2
未找到文件。
guides/source/asset_pipeline.md
浏览文件 @
76c42383
...
...
@@ -21,6 +21,9 @@ What is the Asset Pipeline?
The asset pipeline provides a framework to concatenate and minify or compress
JavaScript and CSS assets. It also adds the ability to write these assets in
other languages and pre-processors such as CoffeeScript, Sass and ERB.
It allows assets in your application to be automatically combined with assets
from other gems. For example, jquery-rails includes a copy of jquery.js
and enables AJAX features in Rails.
The asset pipeline is technically no longer a core feature of Rails 4, it has
been extracted out of the framework into the
...
...
@@ -45,7 +48,7 @@ gem 'coffee-rails'
```
Using the
`--skip-sprockets`
option will prevent Rails 4 from adding
`sass-rails`
and
`uglifier`
to your Gemfile, so if you later want to enable
them
to your Gemfile, so if you later want to enable
the asset pipeline you will have to add those gems to your Gemfile. Also,
creating an application with the
`--skip-sprockets`
option will generate
a slightly different
`config/application.rb`
file, with a require statement
...
...
guides/source/working_with_javascript_in_rails.md
浏览文件 @
76c42383
...
...
@@ -148,10 +148,10 @@ and Rails has got your back in those cases.
Because of Unobtrusive JavaScript, the Rails "Ajax helpers" are actually in two
parts: the JavaScript half and the Ruby half.
Unless you have disabled the Asset Pipeline,
[
rails.js
](
https://github.com/rails/jquery-ujs/blob/master/src/rails.js
)
provides the JavaScript half, and the regular Ruby view helpers add appropriate
tags to your DOM. The CoffeeScript in rails.js then listens for these
attributes, and attaches appropriate handlers.
tags to your DOM.
### form_for
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录