small fix for database query to process recurring faster
This commit is contained in:
parent
93ac6d254e
commit
77764690af
|
@ -48,7 +48,7 @@ class PHire
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.recurring_event(start_date,end_date)
|
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 = []
|
||||||
@recurring_events.each do |re|
|
@recurring_events.each do |re|
|
||||||
case re.recurring_interval
|
case re.recurring_interval
|
||||||
|
|
Loading…
Reference in New Issue