First event (layout incomplete)

This commit is contained in:
Stefan Schlott 2013-08-24 16:07:39 +02:00
parent 06b57577e3
commit 598673558a
3 changed files with 48 additions and 1 deletions

View file

@ -45,6 +45,6 @@ def latest_articles_referred_to(refers_to, max=nil)
p.attributes[:kind]=='article' && p.attributes[:refers_to] && sanitize_path(p.attributes[:refers_to])==refers_to
end.sort do |a, b|
a.attributes[:created_at] <=> b.attributes[:created_at]
end.reverse[0..(max ? max-1 : @cache_latest_art.length-1)]
end.reverse[0..(max ? max-1 : -1)]
end