Created
September 23, 2015 15:02
-
-
Save athap/c87f9db3a7cae6923eba to your computer and use it in GitHub Desktop.
This file contains hidden or 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
u = User.find 1 | |
// page 1 | |
c1 = u.comments.where(disabled: 0).limit(50).page(1).per(20) | |
id1 = c1.map(&:id) | |
//page2 | |
c2 = u.comments.where(disabled: 0).limit(50).page(2).per(20) | |
id2 = c2.map(&:id) | |
//page3 | |
c3 = u.comments.where(disabled: 0).limit(50).page(2).per(20) | |
id3 = c3.map(&:id) | |
I see the issue now. May be we should paginate 50 items
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is what i mean. limit does to restrict page numbers