提交 aad14c92 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #26883 from y-yagi/remove_assets_config_if_skip_sprockets_is_true

remove assets config from `new_framework_defaults` if `--skip-sprockets` is true
......@@ -32,7 +32,9 @@ ActiveSupport.halt_callback_chains_on_return_false = <%= options[:update] ? true
# Configure SSL options to enable HSTS with subdomains. Previous versions had false.
Rails.application.config.ssl_options = { hsts: { subdomains: true } }
<%- end -%>
<%- unless options[:skip_sprockets] -%>
# Unknown asset fallback will return the path passed in when the given
# asset is not present in the asset pipeline.
Rails.application.config.assets.unknown_asset_fallback = <%= options[:update] ? true : false %>
<%- end -%>
......@@ -412,6 +412,9 @@ def test_generator_if_skip_sprockets_is_given
assert_no_match(/config\.assets\.js_compressor = :uglifier/, content)
assert_no_match(/config\.assets\.css_compressor = :sass/, content)
end
assert_file "config/initializers/new_framework_defaults.rb" do |content|
assert_no_match(/unknown_asset_fallback/, content)
end
end
def test_generator_if_skip_action_cable_is_given
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册