Document the use of nopush for asset tags

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.
This commit is contained in:
Kevin Sylvestre 2024-04-23 11:44:56 -07:00
parent ec4558ae9f
commit f72f691b6a
No known key found for this signature in database
GPG Key ID: 41C5CF035E2E7F53

@ -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.
@ -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
#