Why this matters
Avoids loading all rows in memory and reduces timeouts.
Iterate large ActiveRecord sets with find_each/find_in_batches to stream records in batches.
Avoids loading all rows in memory and reduces timeouts.
Side-by-side examples engineers can pattern-match during review.
User.where(active: true).each { |u| process(u) }User.where(active: true).find_each(batch_size: 1000) { |u| process(u) }Model.where(...).eachModel.where(...).find_eachFrom the same buckets as this rule.
All static JS/CSS/font/image files MUST use content-hashed filenames (e.g., app.9c1a7b.js) and be served with "Cache-Control: public, max-age=31536000, immutable". HTML and other non-fingerprinted documents MUST be served with "Cache-Control: no-cache" (or equivalent) to enable conditional revalidation.