diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb index 54e9fe4b2..4e4d494ce 100644 --- a/app/controllers/subjects_controller.rb +++ b/app/controllers/subjects_controller.rb @@ -160,11 +160,14 @@ class SubjectsController < ApplicationController @shixuns = @shixuns.where(id: shixun_ids) end + @shixuns = @shixuns.reorder("created_at desc") @shixuns_count = @shixuns.count ## 分页参数 page = params[:page] || 1 - @shixuns = @shixuns.includes(:myshixuns).reorder("created_at desc").page(page).per(10) + @shixuns = @shixuns.page(page).per(10) + + @shixuns = @shixuns.includes(:myshixuns) end def append_to_stage