Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
59a6ba4b
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,发现更多精彩内容 >>
未验证
提交
59a6ba4b
编写于
10月 02, 2018
作者:
R
Rafael França
提交者:
GitHub
10月 02, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #34053 from prathamesh-sonpatki/update-js-docs
Update js docs after the webpacker changes
上级
a87764e9
f69ac55d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
5 addition
and
17 deletion
+5
-17
guides/source/asset_pipeline.md
guides/source/asset_pipeline.md
+2
-3
guides/source/command_line.md
guides/source/command_line.md
+2
-3
guides/source/generators.md
guides/source/generators.md
+1
-4
guides/source/getting_started.md
guides/source/getting_started.md
+0
-3
guides/source/working_with_javascript_in_rails.md
guides/source/working_with_javascript_in_rails.md
+0
-4
未找到文件。
guides/source/asset_pipeline.md
浏览文件 @
59a6ba4b
...
...
@@ -184,9 +184,8 @@ the file `scaffolds.css` (or `scaffolds.scss` if `sass-rails` is in the
`Gemfile`
.)
For example, if you generate a
`ProjectsController`
, Rails will also add a new
file at
`app/assets/javascripts/projects.coffee`
and another at
`app/assets/stylesheets/projects.scss`
. By default these files will be ready
to use by your application immediately using the
`require_tree`
directive. See
file at
`app/assets/stylesheets/projects.scss`
. By default these files will be
ready to use by your application immediately using the
`require_tree`
directive. See
[
Manifest Files and Directives
](
#manifest-files-and-directives
)
for more details
on require_tree.
...
...
guides/source/command_line.md
浏览文件 @
59a6ba4b
...
...
@@ -185,7 +185,7 @@ The controller generator is expecting parameters in the form of `generate contro
```
bash
$
rails generate controller Greetings hello
create app/controllers/greetings_controller.rb
route get
"greetings/hello"
route get
'greetings/hello'
invoke erb
create app/views/greetings
create app/views/greetings/hello.html.erb
...
...
@@ -193,9 +193,8 @@ $ rails generate controller Greetings hello
create
test
/controllers/greetings_controller_test.rb
invoke helper
create app/helpers/greetings_helper.rb
invoke test_unit
invoke assets
invoke coffee
create app/assets/javascripts/greetings.coffee
invoke scss
create app/assets/stylesheets/greetings.scss
```
...
...
guides/source/generators.md
浏览文件 @
59a6ba4b
...
...
@@ -203,8 +203,6 @@ $ rails generate scaffold User name:string
create
test
/application_system_test_case.rb
create
test
/system/users_test.rb
invoke assets
invoke coffee
create app/assets/javascripts/users.coffee
invoke scss
create app/assets/stylesheets/users.scss
invoke scss
...
...
@@ -426,9 +424,8 @@ $ rails generate scaffold Comment body:text
create
test
/application_system_test_case.rb
create
test
/system/comments_test.rb
invoke assets
invoke coffee
create app/assets/javascripts/comments.coffee
invoke scss
create app/assets/stylesheets/scaffolds.scss
```
Fallbacks allow your generators to have a single responsibility, increasing code reuse and reducing the amount of duplication.
...
...
guides/source/getting_started.md
浏览文件 @
59a6ba4b
...
...
@@ -272,8 +272,6 @@ invoke helper
create app/helpers/welcome_helper.rb
invoke test_unit
invoke assets
invoke coffee
create app/assets/javascripts/welcome.coffee
invoke scss
create app/assets/stylesheets/welcome.scss
```
...
...
@@ -1665,7 +1663,6 @@ This creates five files and one empty directory:
| app/views/comments/ | Views of the controller are stored here |
| test/controllers/comments_controller_test.rb | The test for the controller |
| app/helpers/comments_helper.rb | A view helper file |
| app/assets/javascripts/comments.coffee | CoffeeScript for the controller |
| app/assets/stylesheets/comments.scss | Cascading style sheet for the controller |
Like with any blog, our readers will create their comments directly after
...
...
guides/source/working_with_javascript_in_rails.md
浏览文件 @
59a6ba4b
...
...
@@ -494,10 +494,6 @@ replace the entire `<body>` of the page with the `<body>` of the response. It
will then use PushState to change the URL to the correct one, preserving
refresh semantics and giving you pretty URLs.
The only thing you have to do to enable Turbolinks is have it in your
`Gemfile`
,
and put
`//= require turbolinks`
in your JavaScript manifest, which is usually
`app/assets/javascripts/application.js`
.
If you want to disable Turbolinks for certain links, add a
`data-turbolinks="false"`
attribute to the tag:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录