Add missing preload_link_tag in ActionView helper guide

This commit is contained in:
Aashish Saini 2023-11-09 19:52:16 +05:30
parent 60d05cda7f
commit a109b9f06a
1 changed files with 9 additions and 0 deletions

View File

@ -99,6 +99,15 @@ javascript_url "common"
# => http://www.example.com/assets/common.js
```
#### preload_link_tag
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.
```ruby
preload_link_tag "application.css"
# => <link rel="preload" href="/assets/application.css" as="style" type="text/css" />
```
#### stylesheet_link_tag
Returns a stylesheet link tag for the sources specified as arguments. If you don't specify an extension, `.css` will be appended automatically.