I want to create infinite scroll inside twitter bootstrap using kaminari. From what I understand, Kaminari takes a collection of objects (in my case images), and splits them over separate pages.
I am creating the infinite scroll by rendering the "next" link, however, Bootstrap modals don't have pages. So how can I make this work?
Here is the action of clicking on the "Next" link inside the modal:
Started GET "/modal?modal=modals%2Fgallery&page=2&template=modal-gallery" for...
Processing by ApplicationController#raise_not_found as JS
Parameters: {"modal"=>"modals/gallery", "page"=>"2", "template"=>"modal-gallery", "unmatched_route"=>"modal"}