Skip to content

Commit

Permalink
Allow common house times that touch
Browse files Browse the repository at this point in the history
  • Loading branch information
joyvuu-dave committed May 28, 2018
1 parent 340ed6c commit 6600259
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/common_house_reservation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def period_is_free
errors.add(:base, "Time period is already taken") if CommonHouseReservation
.where(community_id: community_id)
.where.not(id: id)
.where("start_date <= ?", end_date)
.where("end_date >= ?", start_date)
.where("start_date < ?", end_date)
.where("end_date > ?", start_date)
.exists?
end

Expand Down

0 comments on commit 6600259

Please sign in to comment.