Displaying 1 result from an estimated 1 matches for "weeklystoryratingtot".
Did you mean:
weeklystoryratingtotal
2007 Apr 13
0
mixin behavior
...dels are pretty simple. I''d like to get a better aliasing
technique in place, but this at least executes:
---
class AllTimeStoryRatingTotal < ActiveRecord::Base
belongs_to :story
extend StoryRatingTotals
def self.refresh_totals
self.refresh_story_totals
end
end
---
class WeeklyStoryRatingTotal < ActiveRecord::Base
belongs_to :story
extend StoryRatingTotals
def self.refresh_totals
self.refresh_story_totals(1.week.ago)
end
end
---
class MonthlyStoryRatingTotal < ActiveRecord::Base
belongs_to :story
extend StoryRatingTotals
def self.refresh_totals
self.refr...