Rails does model loading on demand. For a rake task that I\'m writing, I need to be able to iterate over all ActiveRecord::Base instances (which is possible wi
I needed all models loaded for a rake task that checks the validity of all records, and found the handy method eager_load, which can be used simply like so: