diff --git a/backend/app/controllers/api/charts_controller.rb b/backend/app/controllers/api/charts_controller.rb index 44184e1..9077f16 100644 --- a/backend/app/controllers/api/charts_controller.rb +++ b/backend/app/controllers/api/charts_controller.rb @@ -149,7 +149,7 @@ def all charts = Chart - .preload(%i[author co_authors variants tags]) + .preload(%i[author co_authors tags]) .limit(length) .offset(params[:offset].to_i || 0) .where(**cond) diff --git a/backend/app/models/chart.rb b/backend/app/models/chart.rb index 32dabee..7168929 100644 --- a/backend/app/models/chart.rb +++ b/backend/app/models/chart.rb @@ -32,7 +32,7 @@ class Chart < ApplicationRecord enum :visibility, VISIBILITY, prefix: "visibility" def self.include_all - preload(%i[author co_authors variants tags file_resources]).merge( + preload(%i[author co_authors _variants tags file_resources]).merge( FileResource.with_attached_file ) end