I have a partial with relatively deep conditionals and I was curious if this is appropriate for a partial?
I'm cycling through an array of Games and printing YES or NO based on whether or not the date of the game matches today's date.
<% i = 0 %>
<% x = 0 %>
<% @games.each do |game| %>
<% if game.date.strftime("%_m/%d")[1..-1] == today %>
YES!
<% i = 1 %>
<% else %>
<% unless i == 1 %>
NO!
<% i = 1 %>
<% x = 1 %>
<%= next_game %>
<% end %>
<% end %>
<% end %>
Thanks!