diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index ca168ccb8..dee79bc31 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -110,7 +110,7 @@ class WelcomeController < ApplicationController def contest @contest_page = FirstPage.where("page_type = 'contest'").first - @contest_notifications = ContestNotification.order("id desc") + @contest_notifications = Contestnotification.order("created_at desc").limit(5) end def search diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index 251ade0b3..b6fcdf8c9 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -166,14 +166,12 @@