top sorting fix for archive

This commit is contained in:
Harry Bomrah 2016-05-12 20:07:15 +08:00
parent 62da6d6462
commit a7d4755043
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ class ArchivesController < ApplicationController
}
end
sorted = archives.sort_by{|k,v| k["sort_number"].to_i}
# sorted = sorted.sort_by{|k,v| v["is_top"]}
sorted = sorted.sort{|k,v| v["is_top"] <=> k["is_top"]}
{
"category-title" => category.title,
"archives" => sorted,