refactors all .each blocks into render _partial.html.erb