Skip to content

Commit

Permalink
Document the use of nopush for asset tags
Browse files Browse the repository at this point in the history
This mirrors the documentation on `preload_link_tag` for the following:

 - `javascript_include_tag`
 - `stylesheet_link_tag`

These methods have a similar API with a different default behavior. The
methods for these methods default to including a `nopush` with the
corresponding link header.
  • Loading branch information
ksylvest committed Apr 23, 2024
1 parent ec4558a commit f72f691
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions actionview/lib/action_view/helpers/asset_tag_helper.rb
Expand Up @@ -68,6 +68,8 @@ module AssetTagHelper
# attribute, which indicates to the browser that the script is meant to
# be executed after the document has been parsed. Additionally, prevents
# sending the Preload Links header.
# * <tt>:nopush</tt> - Specify if the use of server push is not desired
# for the script. Defaults to +true+.
#
# Any other specified options will be treated as HTML attributes for the
# +script+ tag.
Expand Down Expand Up @@ -168,6 +170,8 @@ def javascript_include_tag(*sources)
# when it is set to true.
# * <tt>:nonce</tt> - When set to true, adds an automatic nonce value if
# you have Content Security Policy enabled.
# * <tt>:nopush</tt> - Specify if the use of server push is not desired
# for the stylesheet. Defaults to +true+.
#
# ==== Examples
#
Expand Down

0 comments on commit f72f691

Please sign in to comment.