实训课程搜索

dev_forum
daiao 5 years ago
parent 8b3f5eeddf
commit 063af419f5

@ -160,14 +160,11 @@ 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.size
## 分页参数 ## 分页参数
page = params[:page] || 1 page = params[:page] || 1
@shixuns = @shixuns.page(page).per(10) @shixuns = @shixuns.includes(:myshixuns).reorder("created_at desc").page(page).per(10)
@shixuns = @shixuns.includes(:myshixuns)
end end
def append_to_stage def append_to_stage

Loading…
Cancel
Save