I know I could use pagination gems to accomplish a task like this, but I want to better understand some rails native methods of doing so.
Let’s say I want the first entries in a model, I could do:
Model.order("created_at ASC").limit(10)
But I want to, say, find the second or third or fourth ten entries. How would I do that?
Model.order("created_at ASC").#take the second ten or something
You many want to use the
offsetmethod:returns 5 items starting from 31st item.