Autocorrect new rubocop offenses
This commit is contained in:
parent
deda3d4273
commit
988b3bf689
24 changed files with 48 additions and 41 deletions
|
|
@ -82,13 +82,13 @@ class EventSchedule < ApplicationRecord
|
|||
end
|
||||
|
||||
def start_after_end_hour
|
||||
return unless event && start_time && event.program&.conference && event.program.conference.end_hour
|
||||
return unless event && start_time && event.program&.conference&.end_hour
|
||||
|
||||
errors.add(:start_time, "can't be after the conference end hour (#{event.program.conference.end_hour})") if start_time.hour >= event.program.conference.end_hour
|
||||
end
|
||||
|
||||
def start_before_start_hour
|
||||
return unless event && start_time && event.program&.conference && event.program.conference.start_hour
|
||||
return unless event && start_time && event.program&.conference&.start_hour
|
||||
|
||||
errors.add(:start_time, "can't be before the conference start hour (#{event.program.conference.start_hour})") if start_time.hour < event.program.conference.start_hour
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue