个人主页实践课程公开状态问题

dev_jupyter
daiao 5 years ago
parent d8f3e65bfd
commit 375f724e57

@ -70,12 +70,21 @@ class Users::SubjectService
end end
def manage_subject_status_filter(relations) def manage_subject_status_filter(relations)
status = case params[:status] if params[:status] == "publiced"
when 'editing' then 0 relations = relations.where(public: 2)
when 'applying' then 1 elsif params[:status] == "applying"
when 'published' then 2 relations = relations.where(public: 1)
end else
relations = relations.where(status: status) if status status = case params[:status]
when 'editing' then
0
when 'applying' then
1
when 'published' then
2
end
relations = relations.where(status: status) if status
end
relations relations
end end

Loading…
Cancel
Save