Skip to content

Commit 657e91f

Browse files
committed
refactor(events): remove unnecessary text translations preload and update includes in event policy
1 parent b4cc929 commit 657e91f

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

app/controllers/better_together/events_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,6 @@ def preload_event_associations! # rubocop:todo Metrics/CyclomaticComplexity, Met
325325

326326
# Preload translations for the event itself
327327
@event.string_translations.load
328-
@event.text_translations.load
329328

330329
# Preload cover image attachment to avoid attachment queries
331330
@event.cover_image_attachment&.blob&.load if @event.cover_image.attached?

app/policies/better_together/event_policy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def event_host_member?
5757
class Scope < ApplicationPolicy::Scope
5858
def resolve
5959
scope.with_attached_cover_image
60-
.includes(:string_translations, :text_translations, :location, :event_hosts, categorizations: {
60+
.includes(:string_translations, :location, :event_hosts, categorizations: {
6161
category: %i[
6262
string_translations cover_image_attachment cover_image_blob
6363
]

0 commit comments

Comments
 (0)