Report question

Question: Rails: getting data from a table for each iteraction of a loop