KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am iterating through a large array of model objects and need to paginate for performance/memory reasons. I want to do something like this: for i in 1..Person.num_pages Person.page(i).each do # work end end Obviously I can get the count and do the math myself, but is there an equivalent of num_pages? Or is there a more elegant way of doing this altogether?
Tags (comma-separated)
Save Edits
Cancel