Last Updated: February 25, 2016
·
322
· janavpetrova

Scrolling to paginating block

It turned out that it is possible to pass an anchor as an argument to the paginate method from gem Kaminari:

= paginate person_posts, params: { anchor: "personPostsBlock" }

So, if you have personPostsBlock somewhere in the end of the page, the user will be scrolled straight to this block.