summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2013-11-12 10:19:43 +0100
committerAlex Legler <alex@a3li.li>2013-11-12 10:19:43 +0100
commite1b1538c893ca1e13505bc763143817c9f44a5c9 (patch)
tree175171e033074bd516850e28afcfda85647c3667
parentSet link in Atom feed (diff)
downloadinfra-status-e1b1538c893ca1e13505bc763143817c9f44a5c9.tar.gz
infra-status-e1b1538c893ca1e13505bc763143817c9f44a5c9.tar.bz2
infra-status-e1b1538c893ca1e13505bc763143817c9f44a5c9.zip
Implement proper sorting
-rw-r--r--lib/notice_store.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/notice_store.rb b/lib/notice_store.rb
index abb8fb3..efd98f6 100644
--- a/lib/notice_store.rb
+++ b/lib/notice_store.rb
@@ -23,8 +23,7 @@ class NoticeStore
end
end
- # Name your stuff with YYYYMMDD-foo to get the newest notices on top
- @notices.reverse!
+ @notices.sort! { |a, b| b['created_at'] <=> a['created_at'] }
@load_date = DateTime.now
end