PERF: Remove N+1 query in `SiteSerializer#user_color_schemes`.

PERF: Remove N+1 query in SiteSerializer#user_color_schemes.

diff --git a/app/serializers/site_serializer.rb b/app/serializers/site_serializer.rb
index e1d0982..acdf3e5 100644
--- a/app/serializers/site_serializer.rb
+++ b/app/serializers/site_serializer.rb
@@ -50,7 +50,7 @@ class SiteSerializer < ApplicationSerializer
 
   def user_color_schemes
     cache_fragment("user_color_schemes") do
-      schemes = ColorScheme.where('user_selectable').order(:name)
+      schemes = ColorScheme.includes(:color_scheme_colors).where('user_selectable').order(:name)
       ActiveModel::ArraySerializer.new(schemes, each_serializer: ColorSchemeSelectableSerializer).as_json
     end
   end

GitHub sha: eea9fead

This commit appears in #13246 which was approved by SamSaffron. It was merged by tgxworld.