Ruby ActiveRecord getting a range up to last entry?
问题 Suppose I have 100 entries in my database, my mobile application has an infinite listview which queries the database for the entries. The application displays items in batches of 15, once a user reaches the end of the 15 items, the application will query for the next 15 items. This means that there will be a remained of 10 items to make a total 100 items. I have tried looking at some of the ActiveRecord's method such as find : # Find the clients with primary keys 1 and 10. clients = Client