small fix for database query to process recurring faster

This commit is contained in:
Harry Bomrah 2018-01-24 16:33:21 +08:00
parent 93ac6d254e
commit 77764690af
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ class PHire
end
def self.recurring_event(start_date,end_date)
@recurring_events = self.where(:recurring => true)
@recurring_events = self.where(:recurring => true, :recurring_end_date.gte => start_date)
@recurring = []
@recurring_events.each do |re|
case re.recurring_interval