From c78c0cb237fc52482a985b1f80d369046a497f12 Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Sun, 2 Nov 2025 06:10:42 +0000 Subject: [PATCH] Oops, only preload alt style manifests we actually need --- app/controllers/alt_styles_controller.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/controllers/alt_styles_controller.rb b/app/controllers/alt_styles_controller.rb index aad704c6..74cc4853 100644 --- a/app/controllers/alt_styles_controller.rb +++ b/app/controllers/alt_styles_controller.rb @@ -15,15 +15,16 @@ class AltStylesController < ApplicationController @alt_styles.merge!(@color.alt_styles) if @color @alt_styles.merge!(@species.alt_styles) if @species - # We're using the HTML5 image for our preview, so make sure we have all the - # manifests ready! - SwfAsset.preload_manifests @alt_styles.map(&:swf_assets).flatten - respond_to do |format| format.html { @alt_styles = @alt_styles. by_creation_date.order(:color_id, :species_id, :series_name). paginate(page: params[:page], per_page: 30) + + # We're using the HTML5 image for our preview, so make sure we have all the + # manifests ready! + SwfAsset.preload_manifests @alt_styles.map(&:swf_assets).flatten + render } format.json {