Fix ActiveRecord joins RuntimeError unknown class Integer
Summary During a routine deployment, a production service began failing with a cryptic RuntimeError: unknown class: Integer. The error surfaced not when the database query was constructed, but rather when the application attempted to materialize the ActiveRecord Relation (e.g., calling .to_a or iterating over the results). The stack trace pointed deep into ActiveRecord::Relation#build_join_buckets, a method … Read more