use each_slice, available in ruby19
Merge pull request #1 from benprew/master

Quick fix to use #each_slice instead of #in_groups_of, as the latter is a Rails extension