Use a find_each rather than an each
Use a find_each rather than an each

By using an each ActiveRecord is loading in ~600,000 rows from a db and
then loading an absolute ton of join objects. Trying to load all of this
in exhausts all memory and kills the process.

alphagov/whitehall,alphagov/whitehall,alphagov/whitehall,alphagov/whitehall