Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure that ActionView::Helpers::AssetTagHelper.preload_links_header is nil without Rails 6.1 defaults #41052

Merged

Conversation

bogdanvlviv
Copy link
Contributor

In #39939 we automatically set Link header for each stylesheet and script.
In #40882 we added config.action_view.preload_links_header option
to configure whether stylesheet_link_tag and javascript_include_tag
should set automatically Link header.

This commit adds test to make sure that it is disabled by default
for updated apps that haven't adopted new '6.1' defaults.
Also, added changes to Configuring guide

  • Mentioned this option in "Results of config.load_defaults" section
  • Mentioned this option in "Baseline defaults:" section (see ff88113)

/cc @pixeltrix

…der` `nil` without Rails 6.1 defaults

In rails#39939 we automatically set `Link` header for each stylesheet and script.
In rails#40882 we  added `config.action_view.preload_links_header` option
to configure whether `stylesheet_link_tag` and `javascript_include_tag`
should set automatically `Link` header.

This commit adds test to make sure that it is disabled by default
for updated apps that haven't adopted new '6.1' defaults.
Also, added changes to Configuring guide
 - Mentioned this option in "Results of `config.load_defaults`" section
 - Mentioned this option in "Baseline defaults:" section (see ff88113)
@bogdanvlviv bogdanvlviv changed the title Make sure that ActionView::Helpers::AssetTagHelper.preload_links_header nil without Rails 6.1 defaults Make sure that ActionView::Helpers::AssetTagHelper.preload_links_header is nil without Rails 6.1 defaults Jan 8, 2021
@rafaelfranca rafaelfranca merged commit e20a874 into rails:master Jan 8, 2021
rafaelfranca added a commit that referenced this pull request Jan 8, 2021
…fication

Make sure that `ActionView::Helpers::AssetTagHelper.preload_links_header` is `nil` without Rails 6.1 defaults
@bogdanvlviv bogdanvlviv deleted the preload_links_header-clarification branch January 8, 2021 22:47
@LilyReile
Copy link
Contributor

It would be nice if the asset helpers had a preload option so that this setting could be adjusted on a per-asset basis. That would avoid people needing to do it themselves: 18F/identity-idp#4583

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants