diff options
author | Alex Legler <alex@a3li.li> | 2013-11-12 10:19:43 +0100 |
---|---|---|
committer | Alex Legler <alex@a3li.li> | 2013-11-12 10:19:43 +0100 |
commit | e1b1538c893ca1e13505bc763143817c9f44a5c9 (patch) | |
tree | 175171e033074bd516850e28afcfda85647c3667 | |
parent | Set link in Atom feed (diff) | |
download | infra-status-e1b1538c893ca1e13505bc763143817c9f44a5c9.tar.gz infra-status-e1b1538c893ca1e13505bc763143817c9f44a5c9.tar.bz2 infra-status-e1b1538c893ca1e13505bc763143817c9f44a5c9.zip |
Implement proper sorting
-rw-r--r-- | lib/notice_store.rb | 3 |
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 |