Skip to content

Commit

Permalink
doc improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed May 7, 2019
1 parent d0e4ba6 commit aa140e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ A few helpers use javascript, and they are clearly recognizable by the `js` suff

If you use any of them you should load the [pagy.js](https://github.com/ddnexus/pagy/blob/master/lib/javascripts/pagy.js) file, and run `Pagy.init()` on window load and eventually on [AJAX-load](#using-ajax-with-javascript-enabled-helpers).

**CAVEATS**: if you override any `*_js` helper, ensure to override/enforce the relative javascript function, even with a simple copy and paste. If the relation between the helper and the function changes in a next release (e.g. arguments, naming, etc.), your app will still work with your own overriding even without the need to update it.

### Add the oj gem

Although it's not a requirement, if you are on ruby 2.0+ (not jruby), you should add the `gem 'oj'` to your Gemfile. When available, Pagy will automatically use it to boost the performance.
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ If you need the classic pagination bar with links and info, then you have a coup

### Consider the combo navs

If you don't have strict requirements but still need to give the user total feedback and control on the page to display, then consider the `pagy*_combo_nav_js` helpers. That give you the best performance with nav info and UI _(48x faster, 48x lighter and 2,270x more efficient than Kaminari)_ also saving real estate.
If you don't have strict requirements but still need to give the user total feedback and control on the page to display, then consider the `pagy*_combo_nav_js` helpers (faster and lighter when the `oj` gem is available). That gives you the best performance with nav info and UI _(48x faster, 48x lighter and 2,270x more efficient than Kaminari)_ also saving real estate.
#### Consider the countless extra
Expand Down

0 comments on commit aa140e1

Please sign in to comment.