Skip to content

Commit

Permalink
Merge pull request #49984 from aashishpsaini/add-missing-method-in-vi…
Browse files Browse the repository at this point in the history
…ew-helper-guide

Add missing preload_link_tag method in ActionView helper guide [ci skip]
  • Loading branch information
vipulnsward authored Nov 9, 2023
2 parents 60d05cd + a109b9f commit 79cf77d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions guides/source/action_view_helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 79cf77d

Please sign in to comment.