Sha256: 2871513c1e2acc1ebcbb3db4b719abb53457f228803513e600deb91c7594ef66
Contents?: true
Size: 483 Bytes
Versions: 24
Compression:
Stored size: 483 Bytes
Contents
# frozen_string_literal: true 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
24 entries across 24 versions & 2 rubygems