作品列表的性能优化

dev_course
cxt 5 years ago
parent cf583826ea
commit 88f9dbc68e

@ -89,7 +89,7 @@ class HomeworkCommonsController < ApplicationController
@homework_commons = @homework_commons.page(page).per(15)
if @homework_type == 4
@homework_commons = @homework_commons.includes(:homework_detail_manual, :published_settings, :shixuns, :student_works)
@homework_commons = @homework_commons.includes(:homework_detail_manual, :published_settings, :shixuns)
elsif @homework_type == 3
@homework_commons = @homework_commons.includes(:homework_detail_manual, :published_settings, :homework_detail_group)
else

Loading…
Cancel
Save