Skip to content

Commit 79cf77d

Browse files
authored
Merge pull request rails#49984 from aashishpsaini/add-missing-method-in-view-helper-guide
Add missing preload_link_tag method in ActionView helper guide [ci skip]
2 parents 60d05cd + a109b9f commit 79cf77d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

guides/source/action_view_helpers.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@ javascript_url "common"
9999
# => http://www.example.com/assets/common.js
100100
```
101101

102+
#### preload_link_tag
103+
104+
Returns a link tag that browsers can use to preload the source. The source can be the path of a resource managed by asset pipeline, a full path, or an URI.
105+
106+
```ruby
107+
preload_link_tag "application.css"
108+
# => <link rel="preload" href="/assets/application.css" as="style" type="text/css" />
109+
```
110+
102111
#### stylesheet_link_tag
103112

104113
Returns a stylesheet link tag for the sources specified as arguments. If you don't specify an extension, `.css` will be appended automatically.

0 commit comments

Comments
 (0)