diff --git a/docs/extras.md b/docs/extras.md index 36eedaf1c..d5a6c82de 100644 --- a/docs/extras.md +++ b/docs/extras.md @@ -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. diff --git a/docs/how-to.md b/docs/how-to.md index f265fe9cf..83444a6b1 100644 --- a/docs/how-to.md +++ b/docs/how-to.md @@ -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