Skip to main content

What it flags

The standalone loadwise perf polyglot command detects a find or find_by call to a visible Active Record model inside an each block where the lookup uses its loop key.

How to review or fix

Consider loading independent keys together if the query preserves the expected ordering, missing records and authorization scopes.