gathered array of ids to pass into where statement to create an active record object instead of an aray of hashes