Fix row_class only working on first row

Because delete was used, row_class was nil from the second iteration of the loop. Assign outside the loop instead.