1

According to the documentation, an entry's updated value Defaults to the updated_at attribute on the record if one such exists. I'm trying to override the updated value, but instead I'm getting two updated fields in my RSS feed.

If I set a different updated value with this (truncated) example...

feed.entry(item) do |entry|
  entry.updated(item.not_the_updated_at_value.strftime("%Y-%m-%dT%H:%M:%SZ"))
end

...Then I end up with two updated fields in my RSS feed:

<entry>
    <id>1</id>
    <published>2010-03-30T13:11:07-07:00</published>
    <updated>2010-03-30T13:11:07-07:00</updated>
    <link rel="alternate" type="text/html" href="http://example.com/1"/>
    <title>Title</title>
    <content type="html">Content</content>
    <url>http://example.com/1/</url>
    <updated>2012-07-10T11:05:32Z</updated>
    <author>
      <name>Author</name>
    </author>
  </entry>
James Chevalier
  • 10,604
  • 5
  • 48
  • 74

1 Answers1

2

You have to pass the published and updated options into entry.

feed.entry(item, :published => item.published_at, 
                   :updated => item.published_at) do |entry|
  entry.content item.body, :type => 'html'
end
heyrolled
  • 451
  • 4
  • 13