FIX: Support quarterly on user directory
This commit is contained in:
parent
9f75870d99
commit
2d4729782e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue