AtomFeedHelper and AtomFeedHelper::AtomFeedBuilder
Atom feeds started out as more or less the next generation of RSS syndication feeds. RSS can stand for Really Simple Syndication, Rich Site Summary, or RDF Site Summary, which is part of why Atom’s developers decided to start over with a new name. Syndication feeds make it easy for sites, especially news sites and weblogs, to share their content with other websites and consumers, offering a simpler format for articles than full HTML pages. Atom, especially its REST-based Atom Publishing Protocol (AtomPub), has grown beyond just exchanging lists of articles, but Rails’ built-in helper functions focus on fairly traditional feed applications.
AtomHelper is mostly used in
Builder templates for creating XML:
atom_feedTakes a block, creating an
atom:feedelement and giving the block an AtomFeedBuilder object that child components can use for context. It also accepts parameters for:language,:root_url,:url, and:schema_date.entryCreates an
atom:entryelement. Accepts parameters for:published, which represents the time when the entry was first published,:update, which represents the time of the latest changes, and:url, where to find the entry.updatedTakes a time and converts it to the right format for Atom feed times.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access