diff --git a/app/models/property.rb b/app/models/property.rb index 42e9232..1bcaefa 100644 --- a/app/models/property.rb +++ b/app/models/property.rb @@ -100,7 +100,7 @@ class Property available = false end if available - bookings = phires.where(:recurring_end_date.gte => stime, :recurring => true) + phires.where(:recurring => false,:recurring_end_date => nil) + phires.where(:recurring => false,:recurring_end_date.gte => stime) + bookings = phires.where(:recurring_end_date.gte => stime, :recurring => true) case interval when 'week' d_step = 1.week