chore: Replace deprecated functions (#5611)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
David Kubeš
2022-10-12 23:55:59 +02:00
committed by GitHub
parent 0c8f744c33
commit 6c048626d0
7 changed files with 8 additions and 8 deletions

View File

@@ -40,7 +40,7 @@ class WorkingHour < ApplicationRecord
validate :open_all_day_and_closed_all_day
def self.today
# While getting the day of the week, consider the timezone as well. `first` would
# While getting the day of the week, consider the timezone as well. `first` would
# return the first working hour from the list of working hours available per week.
inbox = first.inbox
find_by(day_of_week: Time.zone.now.in_time_zone(inbox.timezone).to_date.wday)