app/models/calendar.rb in kit_cms-2.3.16 vs app/models/calendar.rb in kit_cms-2.3.17

- old
+ new

@@ -4,10 +4,10 @@ has_many :calendar_entry_types validates :name, :presence=>true, :uniqueness=>true, :length=>{:minimum=>1, :maximum=>200} def entries_between(start_date, end_date, filter, position = nil, distance = nil) - e = self.calendar_entries.where(["(start_date < ? and end_date > ?)", end_date, start_date]).includes({:location=>:subregion}) + e = self.calendar_entries.where(["(start_date <= ? and end_date >= ?)", end_date, start_date]).includes({:location=>:subregion}) if filter =~ /subregions.name/ e = e.joins({:location=>:subregion}) elsif filter =~ /location/ e = e.joins(:location)