FIX: Support quarterly on user directory

This commit is contained in:
Robin Ward 2015-08-17 13:58:19 -04:00
parent 9f75870d99
commit 2d4729782e

View file

@ -13,7 +13,7 @@ class DirectoryItem < ActiveRecord::Base
end
def self.period_types
@types ||= Enum.new(:all, :yearly, :monthly, :weekly, :daily)
@types ||= Enum.new(:all, :yearly, :monthly, :weekly, :daily, :quarterly)
end
def self.refresh!
@ -28,6 +28,7 @@ class DirectoryItem < ActiveRecord::Base
since = case period_type
when :daily then 1.day.ago
when :weekly then 1.week.ago
when :quarterly then 3.weeks.ago
when :monthly then 1.month.ago
when :yearly then 1.year.ago
else 1000.years.ago