Posts Tagged “activerecord”
2013-10-10 Rails 4.1: ActiveRecord::Base.find_each Enumerator
Iterators allow for lazy enumeration over a collection of objects. When trying to refactor a simple rate limiter using Ruby blocks, I had to realize that ActiveRecord's batch finding is not a proper enumerable citizen. It is in Rails 4.1-beta.