diff --git a/app/controllers/competitions_controller.rb b/app/controllers/competitions_controller.rb index e73c779a..1a42a9c6 100644 --- a/app/controllers/competitions_controller.rb +++ b/app/controllers/competitions_controller.rb @@ -28,6 +28,8 @@ class CompetitionsController < ApplicationController competitions = Competition.where('status = 1 or published_at is not null') case params[:category] + when 'nearly_published' then + competitions = competitions.where('published_at is not null AND status = 0') when 'progressing' then competitions = competitions.where('end_time > NOW()') when 'ended' then diff --git a/app/views/competitions/index.html.erb b/app/views/competitions/index.html.erb index 36743613..44607ef8 100644 --- a/app/views/competitions/index.html.erb +++ b/app/views/competitions/index.html.erb @@ -3,6 +3,8 @@