Iterate collections using each so it works with AR Relation