Skip to content

Commit

Permalink
[ci-skip] Add note re: html safe helpers (#254)
Browse files Browse the repository at this point in the history
Fixes discussion noted in: #6
  • Loading branch information
benkoshy committed Aug 18, 2020
1 parent 1d812be commit 01e4a14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/how-to.md
Expand Up @@ -58,14 +58,14 @@ This page contains the practical tips and examples to get the job done with Pagy
- with a fast helper (also styled for [bootstrap](extras/bootstrap.md), [bulma](extras/bulma.md), [foundation](extras/foundation.md), [materialize](extras/materialize.md), [semantic](extras/semantic.md), [uikit](extras/uikit.md) and available in different flavors (static, responsive, compact, etc.)

```erb
<%# Note the double equals sign "==" which marks the output as trusted and html safe: %>
<%== pagy_nav(@pagy) %>
```
- or with an easy customizable template:

```erb
```erb
<%== render partial: 'pagy/nav', locals: {pagy: @pagy} %>
```

- Option B: if your app renders the views with a javascript framework (e.g. Vue.js, react.js, ...), you don't need the `include Pagy::Frontend` in `ApplicationHelper`, instead:

1. require the [metadata extra](extras/metadata.md) by uncommenting the following line in your [pagy.rb](https://github.com/ddnexus/pagy/blob/master/lib/config/pagy.rb) file:
Expand Down

0 comments on commit 01e4a14

Please sign in to comment.