diff --git a/app/helpers/contests_helper.rb b/app/helpers/contests_helper.rb index 93af48b4c..cb4d6a0f7 100644 --- a/app/helpers/contests_helper.rb +++ b/app/helpers/contests_helper.rb @@ -167,5 +167,6 @@ module ContestsHelper end tmp end + end \ No newline at end of file diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index f56281d6b..10e8a4471 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -98,9 +98,13 @@ module WelcomeHelper end def find_all_hot_contest limit=10 - Contest.all.take limit + Contest.reorder("created_on DESC").all.take limit end + def find_all_hot_softapplication limit=10 + Softapplication.reorder("created_at DESC").all.take limit + end + def cal_memos_count event return nil if event.parent_id event.replies_count diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index 60aafd949..935f28ea5 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -93,10 +93,11 @@
- - -- <%= link_to( contest.name, respond_path(contest.id), :class => "d-g-blue d-p-project-name", :title => "#{contest.name}", - :style => "margin-left: 28px;", :target => "_blank") %> -
-- <%= content_tag "span", contest.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => contest.description %> -
+- <%= link_to( contest.name, respond_path(contest.id), :class => "d-g-blue d-p-project-name", :title => "#{contest.name}", - :style => "margin-left: 28px;", :target => "_blank") %> -
-- <%= content_tag "span", contest.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => contest.description %> -
+