diff --git a/app/services/users/subject_service.rb b/app/services/users/subject_service.rb index 53ff3f4b9..d0b995c8e 100644 --- a/app/services/users/subject_service.rb +++ b/app/services/users/subject_service.rb @@ -70,12 +70,21 @@ class Users::SubjectService end def manage_subject_status_filter(relations) - status = case params[:status] - when 'editing' then 0 - when 'applying' then 1 - when 'published' then 2 - end - relations = relations.where(status: status) if status + if params[:status] == "publiced" + relations = relations.where(public: 2) + elsif params[:status] == "applying" + relations = relations.where(public: 1) + else + 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 end