From 2d4729782e23c0476788bac2df634235cef698f1 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 17 Aug 2015 13:58:19 -0400 Subject: [PATCH] FIX: Support quarterly on user directory --- app/models/directory_item.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/directory_item.rb b/app/models/directory_item.rb index ec6146162b0..8e6ad2d2ce6 100644 --- a/app/models/directory_item.rb +++ b/app/models/directory_item.rb @@ -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