Quick optimisation
This commit is contained in:
parent
53368a7ebc
commit
ab915b0c56
@ -56,6 +56,7 @@ class Event < ApplicationRecord
|
||||
where '? <= end_time and start_time <= ?',
|
||||
start_date.to_date.beginning_of_month.beginning_of_week,
|
||||
start_date.to_date.end_of_month.end_of_week.end_of_day
|
||||
includes :tags
|
||||
end)
|
||||
scope :period, (lambda do |year, week|
|
||||
start_date = Date.commercial(year.to_i, week.to_i)
|
||||
|
Loading…
Reference in New Issue
Block a user