From 97f04b58c17d11aafff4bfd827538d1d3b50992a Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Fri, 21 Jul 2023 14:09:19 +0200 Subject: [PATCH] Cleanup duplicate cache busting code --- app/models/room.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/app/models/room.rb b/app/models/room.rb index e88e41928..8bb55931e 100644 --- a/app/models/room.rb +++ b/app/models/room.rb @@ -30,15 +30,8 @@ class Room < ApplicationRecord default_scope { order(order: :asc) } - after_update :touch_conference_program - # Cache Busting on the events page, touch all events. - after_update lambda { - return unless previous_changes[:url] - - event_schedules.update_all(updated_at: Time.now) - } - + after_update :touch_conference_program delegate :conference, to: :venue def embed_url