biola/punching_bag — pull request #14 by cdimartino (2014-12-17 18:03:31+00:00)
Title: Branches/fix losing punches bug

I've discovered a bug wherein some of the punches (particularly the most recent punches) were being lost during the combination. I tracked it down to the rake task, mostly. There was an issue where the punch has been changed in the model code (making it into a combo) but the original record was being used numerous times, causing the hits not to accumulate properly. It was a bit tough to track down and I only sort of grok what was happening.

This code resolves this issue. On heavily trafficked days we were losing quite a number of impressions. Luckily it was noticed by some of our contributors that their impression counts were suddenly dropping at some point.