vendor/plugins/atom_feed_helper/lib/atom_feed_helper.rb
# Creates an entry tag for a specific record and prefills the id using class and id.
#
# Options:
#
# * <tt>:updated</tt>: Time of update. Defaults to the created_at attribute on the record if one such exists.
# * <tt>:published</tt>: Time first published. Defaults to the updated_at attribute on the record if one such exists.
# * <tt>:url</tt>: The URL for this entry. Defaults to the polymorphic_url for the record.
Creates an entry tag for a specific record and prefills the id using class and id.
Options.

:updated: Time of update. Defaults to the created_at attribute on the record if one such exists.
:published: Time first published. 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.
Creates an entry tag for a specific record and prefills the id using class and id . Options . : updated : Time of update . Defaults to the created_at attribute on the record if one such exists . : published : Time first published . 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 .
def entry(record, options = {})
      @xml.entry do 
        @xml.id("tag:#{@view.request.host},#{@feed_options[:schema_date]}:#{record.class}/#{record.id}")
        if options[:published] || (record.respond_to?(:created_at) && record.created_at)
          @xml.published((options[:published] || record.created_at).xmlschema)
        end
        if options[:updated] || (record.respond_to?(:updated_at) && record.updated_at)
          @xml.updated((options[:updated] || record.updated_at).xmlschema)
        end
        @xml.link(:rel => 'alternate', :type => 'text/html', :href => options[:url] || @view.polymorphic_url(record))
        yield @xml
      end
    end
def entry ( record , options = { } ) @xml . entry do @xml . id ( "tag:#{@view.request.host},#{@feed_options[:schema_date]}:#{record.class}/#{record.id}" ) if options [ :published ] || ( record . respond_to? ( :created_at ) && record . created_at ) @xml . published ( ( options [ :published ] || record . created_at ) . xmlschema ) end if options [ :updated ] || ( record . respond_to? ( :updated_at ) && record . updated_at ) @xml . updated ( ( options [ :updated ] || record . updated_at ) . xmlschema ) end @xml . link ( :rel => 'alternate' , :type => 'text/html' , :href => options [ :url ] || @view . polymorphic_url ( record ) ) yield @xml end end
Creates an entry tag for a specific record and prefills the id using class and id.
Creates an entry tag for a specific record and prefills the id using class and id .
record
<not_specific>
options
<not_specific>