Endless scroll

I develop an application in rails 3.2 and ruby 1.9

I am using endless scrolls as described in railcars 114. I works fine except when I try to use it on a remote table with remote will paginate. Then there is already an index.js file and I cannot find out how to use endless scrolling this situation Grateful for any ideas

Railscasts is now premium content. Perhaps you could provide a bit more context.

As a User Experience side note, please be sure that infinite scroll is appropriate. Depending on the goals of your user it can be a frustrating interface. If you are not tracking infinite scroll position then when a user is forced to refresh may loose their place (restoring state is important), and consider if a user might want to share a particular part of the list (state in the url). For general usability reading: Infinite Scrolling is Not for Every Website