dev_jupyter
daiao 5 years ago
parent 84fcff9123
commit 648fe80d12

@ -42,7 +42,7 @@ class SearchService < ApplicationService
{ 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.where(public: 2, status: 2)
.or( Laboratory.current.subjects.where(status: 2, id: User.current.subjects.pluck(:id))) } }
.or( Laboratory.current.subjects.where(status: 2, id: User.current.subjects)).pluck(:id) } }
when 'course' then
{ where: { id: Laboratory.current.all_courses.pluck(:id) } }
else

Loading…
Cancel
Save