mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -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
|
end
|
||||||
|
|
||||||
def self.period_types
|
def self.period_types
|
||||||
@types ||= Enum.new(:all, :yearly, :monthly, :weekly, :daily)
|
@types ||= Enum.new(:all, :yearly, :monthly, :weekly, :daily, :quarterly)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.refresh!
|
def self.refresh!
|
||||||
|
@ -28,6 +28,7 @@ class DirectoryItem < ActiveRecord::Base
|
||||||
since = case period_type
|
since = case period_type
|
||||||
when :daily then 1.day.ago
|
when :daily then 1.day.ago
|
||||||
when :weekly then 1.week.ago
|
when :weekly then 1.week.ago
|
||||||
|
when :quarterly then 3.weeks.ago
|
||||||
when :monthly then 1.month.ago
|
when :monthly then 1.month.ago
|
||||||
when :yearly then 1.year.ago
|
when :yearly then 1.year.ago
|
||||||
else 1000.years.ago
|
else 1000.years.ago
|
||||||
|
|
Loading…
Reference in a new issue