Sha256: ccc65ad349f4808e24090ffde2362f879230039fe98f74dc1682899a07416139
Contents?: true
Size: 447 Bytes
Versions: 2
Compression:
Stored size: 447 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.at(0).xmlschema else times.max.xmlschema end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
publify_core-9.0.1 | app/helpers/xml_helper.rb |
publify_core-9.0.0 | app/helpers/xml_helper.rb |