author avatar

goromlagche

Fri Jun 07 2019

ActiveRecord has a warn_on_records_fetched_greater_than config. If you use it “config.active_record.warn_on_records_fetched_greater_than = 1500” then if you use a Model.all and the records are > 1500 it will long a warning. Generally if the row count is high, you would want to use “find_in_batches” rather than “all”. The original issue https://github.com/rails/rails/issues/16463