Activerecord generates parameterized queries for basic types, but, it does parameterize array types.
E.g.
Article.where(id: 1)
# generates
# SELECT "articles".* FROM "articles" WHERE "articles"."id" = $1 [["id", 1]]
But,
Article.where(id: [1,2])
# generates
# SELECT "articles".* FROM "articles" WHERE "articles"."id" IN (1, 2)
# rather than
# SELECT "articles".* FROM "articles" WHERE "articles"."id" IN ($1, $2)
[["id", 1], ["id", 2],]
Is it possible to restructure the query or use Arel to generate parameterized query for IN clauses?