云上实验室

dev_forge
cxt 5 years ago
parent 11175a3355
commit c5267eeffc

@ -20,8 +20,8 @@ class HomeController < ApplicationController
shixuns = shixuns.where(homepage_show: true)
subjects = subjects.where(homepage_show: true)
else
shixuns = shixuns.joins(:laboratory_shixuns).where(laboratory_shixuns: { homepage: true })
subjects = subjects.joins(:laboratory_subjects).where(laboratory_subjects: { homepage: true })
shixuns = shixuns.joins(:laboratory_shixuns).where(laboratory_shixuns: { homepage: true, laboratory_id: current_laboratory.id})
subjects = subjects.joins(:laboratory_subjects).where(laboratory_subjects: { homepage: true, laboratory_id: current_laboratory.id})
end
@shixuns = shixuns.includes(:tag_repertoires, :challenges).limit(8)

Loading…
Cancel
Save