Skip to content

Commit

Permalink
Merge pull request #49923 from akhilgkrishnan/add-api-reference-to-vi…
Browse files Browse the repository at this point in the history
…ew-helper

API documentation reference added to view helper [ci skip]
  • Loading branch information
jonathanhefner committed Nov 5, 2023
2 parents 8a304dc + a60e1a2 commit febd21d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion guides/source/action_view_helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,16 @@ This would add something like "Process data files (0.34523)" to the log, which y

#### cache

A method for caching fragments of a view rather than an entire action or page. This technique is useful for caching pieces like menus, lists of news topics, static HTML fragments, and so on. This method takes a block that contains the content you wish to cache. See `AbstractController::Caching::Fragments` for more information.
A method for caching fragments of a view rather than an entire action or page. This technique is useful for caching pieces like menus, lists of news topics, static HTML fragments, and so on. This method takes a block that contains the content you wish to cache. See [`AbstractController::Caching::Fragments`][] for more information.

```erb
<% cache do %>
<%= render "application/footer" %>
<% end %>
```

[`AbstractController::Caching::Fragments`]: https://api.rubyonrails.org/classes/AbstractController/Caching/Fragments.html

### CaptureHelper

#### capture
Expand Down

0 comments on commit febd21d

Please sign in to comment.