Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

[1449] Fix cart availability validation [v5.5] #1451

Merged
merged 1 commit into from
Jan 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
* This file will be updated whenever a new release is put into production.
* Any problems should be reported via the "report an issue" link in the footer of the application.

## v5.5.3 - 2016-01-24
### Fixed
* Resolved an issue where checked-out reservations were not being taken into account when validating availability ([#1449](https://github.com/YaleSTC/reservations/issues/1449)).

## v5.5.2 - 2016-01-18
### Fixed
* Resolved an issue where all AdminMailer e-mails were not being delivered ([#1426](https://github.com/YaleSTC/reservations/issues/1426)).
Expand Down
2 changes: 1 addition & 1 deletion app/models/reservation_scopes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def self.included(base) # rubocop:disable MethodLength, AbcSize
scope :for_reserver, ->(reserver) { where(reserver_id: reserver) }
scope :reserved_in_date_range, lambda { |start_date, end_date|
where('start_date <= ? and due_date >= ?', end_date, start_date)
.reserved
.active
}
scope :overlaps_with_date, lambda { |date|
where('start_date <= ? and due_date >= ?', date, date)
Expand Down