I need to DRY up some code in a few models. My first inclination, having come from the Java world, was to go with an abstract class. After a bit of reading, I then decided to follow the mixin route instead. Now I'm running into trouble, most likely from a few basic misunderstandings.
There are three models I will be using to average and count rating data by executing a scheduled job. Basically, I want to get averages and counts for the last week, the last month, and all time, and dump the data into isolated tables to allow for quick reads. The logic is pretty much identical for each instance. I just have a variance of dates and a different table for each set of summary data. So I defined a module (messy, I know):