So I'm trying to clean up my views, removing logic and such.

Here's what I currently have
Code Ruby:
<% if counter == 7 -%><% counter = 0 -%></tr><tr><% end -%>

And here's my attempt at a helper
Code Ruby:
  def week_row_end(counter)
    if counter == 7
     counter = 0 
     row_end = "</tr><tr>"
     counter += 1 

which works…*but only once. The counter being set back to 0 isn't getting sent because the row_end is instead (since it's the last one, correct?). SO, in this instance, is it just necessary to have logic in the view sometimes?

By the way, the goal here is to end a row for a calendar and start a new one.