Sha256: d29e287503e4904f1345053b620331a78b483a9d8c886694dbd49e683ae22dcf
Contents?: true
Size: 452 Bytes
Versions: 1
Compression:
Stored size: 452 Bytes
Contents
module XmlHelper def collection_lastmod(collection) article_updated = collection.contents.order(updated_at: :desc).first article_published = collection.contents.order(published_at: :desc).first times = [] times.push article_updated.updated_at if article_updated times.push article_published.updated_at if article_published if times.empty? Time.zone.at(0).xmlschema else times.max.xmlschema end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
publify_core-9.1.0 | app/helpers/xml_helper.rb |