Replace .all with .to_a

AR 4 has deprecated .all, we need to replace it with .to_a to avoid warnings.

review [ @jduff @byroot @fbogsany @camilo ].any?