Skip to content
Permalink
Browse files

remove assets config from `new_framework_defaults` if `--skip-sprocke…

…ts` is true

If `sprockets` is not loaded, `Rails.application.config.assets` is not defined.
  • Loading branch information...
y-yagi committed Oct 24, 2016
1 parent a0d0648 commit 5b54a904101c48aac9467df1f060b83c67bee832
@@ -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

0 comments on commit 5b54a90

Please sign in to comment.
You can’t perform that action at this time.