Code in a database class like:
return self.all_active[:quantity]
will subsequently be batched by the API. The batching code causes the result set to get sliced again, which ignores the previous slice. So, if quantity=3 and the batching size=5 then the batch returned will actually have 5 items.
Code in a database class like: active[ :quantity]
return self.all_
will subsequently be batched by the API. The batching code causes the result set to get sliced again, which ignores the previous slice. So, if quantity=3 and the batching size=5 then the batch returned will actually have 5 items.