Class

ActionView::Helpers::AtomFeedHelper::AtomFeedBuilder

Inheritance
< ActionView::Helpers::AtomFeedHelper::AtomBuilder < Object

Methods

Class

Visibility Signature
public new (xml, view, feed_options = {})

Instance

Visibility Signature
public entry (record, options = {}) {|AtomBuilder.new(@xml)| ...}
public updated (date_or_time = nil)

Class Method Detail

new(xml, view, feed_options = {})

Instance Method Detail

entry(record, options = {}) {|AtomBuilder.new(@xml)| ...}

Creates an entry tag for a specific record and prefills the id using class and id.

Options:

  • :published: Time first published. Defaults to the created_at attribute on the record if one such exists.
  • :updated: Time of update. Defaults to the updated_at attribute on the record if one such exists.
  • :url: The URL for this entry. Defaults to the polymorphic_url for the record.
  • :id: The ID for this entry. Defaults to "tag:#{@view.request.host},#{@feed_options[:schema_date]}:#{record.class}/#{record.id}"

updated(date_or_time = nil)

Accepts a Date or Time object and inserts it in the proper format. If nil is passed, current time in UTC is used.