Sha256: b0cde6102849530668f3e075223d289425f70a9e2946b65aaf29fa8f6885c00c
Contents?: true
Size: 515 Bytes
Versions: 10
Compression:
Stored size: 515 Bytes
Contents
module XmlHelper def pub_date(time) time.rfc822 end def collection_lastmod(collection) article_updated = collection.articles.find(:first, :order => 'updated_at DESC') article_published = collection.articles.find(:first, :order => 'published_at DESC') times = [] times.push article_updated.updated_at if article_updated times.push article_published.updated_at if article_published if times.empty? Time.at(0).xmlschema else times.max.xmlschema end end end
Version data entries
10 entries across 10 versions & 1 rubygems