fix(semester-scope): meeting date scoped with DateTime caused day overlap

So a scope with DateTime 2019-12-01T00:00:00.0000Z turned out to match
hour meeting date 2019-11-30. Converting that DateTime to date solved the problem.
parent 2bc56731
Pipeline #90020 canceled with stage
in 8 minutes and 10 seconds
......@@ -65,8 +65,8 @@ class Hour < ApplicationRecord
scope :semester_with_date, lambda { |date|
date_between_inclusion(
:meeting_date,
date,
date.advance(months: BillingExpense::SEMESTER_LENGTH)
date.to_date,
date.advance(months: BillingExpense::SEMESTER_LENGTH).to_date
)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment