Skip to content

Commit f72f691

Browse files
committed
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.
1 parent ec4558a commit f72f691

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

actionview/lib/action_view/helpers/asset_tag_helper.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ module AssetTagHelper
6868
# attribute, which indicates to the browser that the script is meant to
6969
# be executed after the document has been parsed. Additionally, prevents
7070
# sending the Preload Links header.
71+
# * <tt>:nopush</tt> - Specify if the use of server push is not desired
72+
# for the script. Defaults to +true+.
7173
#
7274
# Any other specified options will be treated as HTML attributes for the
7375
# +script+ tag.
@@ -168,6 +170,8 @@ def javascript_include_tag(*sources)
168170
# when it is set to true.
169171
# * <tt>:nonce</tt> - When set to true, adds an automatic nonce value if
170172
# you have Content Security Policy enabled.
173+
# * <tt>:nopush</tt> - Specify if the use of server push is not desired
174+
# for the stylesheet. Defaults to +true+.
171175
#
172176
# ==== Examples
173177
#

0 commit comments

Comments
 (0)