Follow amatsudas kaminari example to ajaxify pagination links, render partial to clean up index erb view.
Give pagination id paginator in index erb view.
Fix error in index js erb.