Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
74996cec
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,发现更多精彩内容 >>
提交
74996cec
编写于
12月 08, 2017
作者:
C
claudiob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't run rails active_storage:install in new apps
See #31315 for full discussion
上级
597b9419
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
2 addition
and
16 deletion
+2
-16
guides/source/active_storage_overview.md
guides/source/active_storage_overview.md
+0
-3
railties/lib/rails/generators/app_base.rb
railties/lib/rails/generators/app_base.rb
+0
-10
railties/lib/rails/generators/rails/app/app_generator.rb
railties/lib/rails/generators/rails/app/app_generator.rb
+0
-1
railties/test/generators/app_generator_test.rb
railties/test/generators/app_generator_test.rb
+2
-2
未找到文件。
guides/source/active_storage_overview.md
浏览文件 @
74996cec
...
...
@@ -41,9 +41,6 @@ application to Rails 5.2, run `rails active_storage:install` to generate a
migration that creates these tables. Use
`rails db:migrate`
to run the
migration.
You need not run
`rails active_storage:install`
in a new Rails 5.2 application:
the migration is generated automatically.
Declare Active Storage services in
`config/storage.yml`
. For each service your
application uses, provide a name and the requisite configuration. The example
below declares three services named
`local`
,
`test`
, and
`s3`
:
...
...
railties/lib/rails/generators/app_base.rb
浏览文件 @
74996cec
...
...
@@ -456,16 +456,6 @@ def generate_spring_binstubs
end
end
def
run_active_storage
unless
skip_active_storage?
if
bundle_install?
rails_command
"active_storage:install"
,
capture:
options
[
:quiet
]
else
log
(
"Active Storage installation was skipped. Please run `bin/rails active_storage:install` to install Active Storage files."
)
end
end
end
def
empty_directory_with_keep_file
(
destination
,
config
=
{})
empty_directory
(
destination
,
config
)
keep_file
(
destination
)
...
...
railties/lib/rails/generators/rails/app/app_generator.rb
浏览文件 @
74996cec
...
...
@@ -463,7 +463,6 @@ def finish_template
public_task
:apply_rails_template
,
:run_bundle
public_task
:run_webpack
,
:generate_spring_binstubs
public_task
:run_active_storage
def
run_after_bundle_callbacks
@after_bundle_callbacks
.
each
(
&
:call
)
...
...
railties/test/generators/app_generator_test.rb
浏览文件 @
74996cec
...
...
@@ -854,7 +854,7 @@ def test_after_bundle_callback
template
end
sequence
=
[
"git init"
,
"install"
,
"exec spring binstub --all"
,
"
active_storage:install"
,
"
echo ran after_bundle"
]
sequence
=
[
"git init"
,
"install"
,
"exec spring binstub --all"
,
"echo ran after_bundle"
]
@sequence_step
||=
0
ensure_bundler_first
=
->
command
,
options
=
nil
do
assert_equal
sequence
[
@sequence_step
],
command
,
"commands should be called in sequence
#{
sequence
}
"
...
...
@@ -871,7 +871,7 @@ def test_after_bundle_callback
end
end
assert_equal
5
,
@sequence_step
assert_equal
4
,
@sequence_step
end
def
test_gitignore
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录