if counter % 2 == 1 I am trying to decode this line - it\'s a Rails project and I am trying to figure out what the % does in this if statement.
if counter % 2 == 1
%
Its the modulo operator.
http://en.wikipedia.org/wiki/Modulo_operation