mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FIX: Support quarterly on user directory
This commit is contained in:
parent
9f75870d99
commit
2d4729782e
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue