Skip to content

Commit

Permalink
Minor docs changes [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Aug 20, 2019
1 parent 2f7a346 commit 7160a18
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion README.md
Expand Up @@ -17,11 +17,16 @@ Pagy is the ultimate pagination gem that outperforms the others in each and ever
- Pagy 3.0+ is considerably faster, lighter and more efficient than 2.0+ on modern environments (see the charts below)
- The javascript nav helpers have been refactored for improved performance and more intuitive API
- The i18n has been refactored, the dictionary files are simpler and 100% compliant with the i18n gem
- Added a few new [extras](https://ddnexus.github.io/pagy/extras)
- Added [Maximizing Performance](https://ddnexus.github.io/pagy/how-to#maximizing-performance) docs as a practical guide to choose the best options for your requirements and environment

**Notice**: Updating from 2.0+ to 3.0+ requires just some search and replace and a little reorganization of your custom i18n dictionaries. Check the [CHANGELOG](https://github.com/ddnexus/pagy/blob/master/CHANGELOG.md) for details.

**Suggestion**: If you are using any `pagy*_nav` helper, [consider to switch](https://ddnexus.github.io/pagy/how-to#consider-the-nav_js) to `pagy*_nav_js`, which gives you the same output with a substancial performance boost.
**Suggestions**:

- If you are using any `pagy*_nav` helper, [consider to switch](https://ddnexus.github.io/pagy/how-to#consider-the-nav_js) to `pagy*_nav_js`, which gives you the same output with a substancial performance boost.
- If you are using any javascript frontend, take a look at the [metadata](https://ddnexus.github.io/pagy/extras/metadata) extra
- For API pagination take a look at the [headers](http://ddnexus.github.io/pagy/extras/headers) extra

## Comparison with other gems

Expand Down
8 changes: 4 additions & 4 deletions docs/how-to.md
Expand Up @@ -45,7 +45,7 @@ This page contains the practical tips and examples to get the job done with Pagy

5. Render the pagination:

- If your app renders the views server-side:
- Option A: if your app renders the views server-side:

1. Include the frontend in some helper (e.g. `ApplicationHelper` in Rails):

Expand All @@ -60,13 +60,13 @@ This page contains the practical tips and examples to get the job done with Pagy
```erb
<%== pagy_nav(@pagy) %>
```
- or it with an easy customizable template:
- or with an easy customizable template:

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

- 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:
- 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 All @@ -81,7 +81,7 @@ This page contains the practical tips and examples to get the job done with Pagy
pagy: pagy_metadata(@pagy) }
```

- If your app is an API service consumed by some client and doesn't provide any UI on its own, you don't need the `include Pagy::Frontend` in `ApplicationHelper`, instead:
- Option C: if your app is an API service consumed by some client and doesn't provide any UI on its own, you don't need the `include Pagy::Frontend` in `ApplicationHelper`, instead:

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

Expand Down

0 comments on commit 7160a18

Please sign in to comment.