Created
March 18, 2011 17:33
-
-
Save rguggemos/876500 to your computer and use it in GitHub Desktop.
Kaminari ajax pager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you switch to kaminari, | |
http://railscasts.com/episodes/254-pagination-with-kaminari | |
...the lines added to application.js become redundant when you implement the pager like in this demo project: | |
https://github.com/amatsuda/kaminari_example/tree/ajax | |
in index.html: | |
<%= paginate @users, :remote => true %> | |
in index.js.rb: | |
$('#users').html('<%= escape_javascript render(@users) %>'); | |
$('#paginator').html('<%= escape_javascript(paginate(@users, :remote => true).to_s) %>'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tks afeter 5 year!!