|
|
|
@ -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)
|
|
|
|
|