|
|
|
@ -39,7 +39,7 @@ class SearchService < ApplicationService
|
|
|
|
|
def extra_options
|
|
|
|
|
case params[:type].to_s.strip
|
|
|
|
|
when 'shixun' then
|
|
|
|
|
{ where: { id: Laboratory.current.shixuns.where(public: 2, status: 2, fork_from: nil).or(Laboratory.current.shixuns.where(status: 2, id: current_user.shixuns)).pluck(:id) } }
|
|
|
|
|
{ where: { id: Laboratory.current.shixuns.where(public: 2, status: 2, fork_from: nil).or(Laboratory.current.shixuns.where(status: 2, id: User.current.shixuns)).pluck(:id) } }
|
|
|
|
|
when 'subject' then
|
|
|
|
|
{ where: { id: Laboratory.current.subjects.pluck(:id) } }
|
|
|
|
|
when 'course' then
|
|
|
|
|