实训路径搜索

dev_forum
daiao 5 years ago
parent d9b352bb32
commit 800417eff4

@ -160,11 +160,14 @@ class SubjectsController < ApplicationController
@shixuns = @shixuns.where(id: shixun_ids) @shixuns = @shixuns.where(id: shixun_ids)
end end
@shixuns = @shixuns.reorder("created_at desc")
@shixuns_count = @shixuns.count @shixuns_count = @shixuns.count
## 分页参数 ## 分页参数
page = params[:page] || 1 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 end
def append_to_stage def append_to_stage

Loading…
Cancel
Save