You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the JS option is enabled (always by default) a script tag is appended in the DOM (as for this line here).
This behavior raises two different issues:
having the assets pipeline on (as recommended in production) the server will reply with an HTML 404 as the script should really be compiled with the others
If the script is served, it will load and bind to the link on the pagination bar an AJAX function.
This leads to this kind of behaviour: Note: this is trigger by a single click, as you see the starting point is the same of all 4.
When the user clicks a couple of letters on the bar a massive number of requests start to hit the server.
While there are some solutions to fix such behavior it looks to me that this kind of things should really be implemented by the user himself rather than be in the bundle.
I'd propose to remove such option, or at least ship the JS file as a separate asset that can be included but no automagically included as it does right now.
Documenting on the WIKI how to enable it seems a reasonable solution to me and will make also the support of this gem much simpler.
The text was updated successfully, but these errors were encountered:
When the
JS
option is enabled (always by default) a script tag is appended in the DOM (as for this line here).This behavior raises two different issues:
HTML 404
as the script should really be compiled with the othersThis leads to this kind of behaviour:
Note: this is trigger by a single click, as you see the starting point is the same of all 4.
When the user clicks a couple of letters on the bar a massive number of requests start to hit the server.
While there are some solutions to fix such behavior it looks to me that this kind of things should really be implemented by the user himself rather than be in the bundle.
For instance a similar gem such will_paginate works this way - no AJAX support in the bundle - and adapt it to work with AJAX is not that hard: http://asciicasts.com/episodes/174-pagination-with-ajax
I'd propose to remove such option, or at least ship the JS file as a separate asset that can be included but no automagically included as it does right now.
Documenting on the WIKI how to enable it seems a reasonable solution to me and will make also the support of this gem much simpler.
The text was updated successfully, but these errors were encountered: