|
|
|
@ -13,7 +13,7 @@ class Competitions::CompetitionsController < Competitions::BaseController
|
|
|
|
|
competitions =
|
|
|
|
|
case params[:category]
|
|
|
|
|
when 'nearly_published' then competitions.where(status: false)
|
|
|
|
|
when 'progressing' then competitions.where('status = 0 and end_time > NOW()')
|
|
|
|
|
when 'progressing' then competitions.where('status = 1 and end_time > NOW()')
|
|
|
|
|
when 'ended' then competitions.where('end_time < NOW()')
|
|
|
|
|
else competitions
|
|
|
|
|
end
|
|
|
|
|