sort fixed for widget

This commit is contained in:
Harry Bomrah 2015-10-13 16:48:45 +08:00
parent 081513f400
commit 172e7aba82
1 changed files with 2 additions and 2 deletions

View File

@ -123,9 +123,9 @@ class AnnouncementsController < ApplicationController
mp = (anns[0]["img_src"] rescue "")
mpd = (anns[0]["img_description"] rescue "")
anns = anns.concat(get_feed_announcements("widget"))
sorted = anns.sort{ |k,v| v["postdate"] <=> k["postdate"] }
# sorted = anns.sort{ |k,v| v["postdate"] <=> k["postdate"] }
{
"announcements" => sorted,
"announcements" => anns,
"extras" => {
"more_url"=>OrbitHelper.widget_more_url,
"main_picture" => mp,