Quantcast
Channel: Feedjira not adding content and author - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by PascalTurbo for Feedjira not adding content and author

$
0
0

RSS and Atom Feeds don't offer a content attribute. The 'content' is provided as 'summary' attribute. So change

local_entry.update_attributes(content: entry.content, author: entry.author, url: entry.url, published: entry.published)

to

local_entry.update_attributes(content: entry.summary, author: entry.author, url: entry.url, published: entry.published)

Nevertheless, NewsFeeds are very fickle things. So you shouldn't rely on the existence of single attributes.

Have a look at your show.html.erb

<%= @entry.content.html_safe %>

You could for example use the safe navigation operator

<%= @entry&.content&.html_safe %>

Or inform the user, that no content is present

<% unless @entry.content.nil? %><%= @entry.content.html_safe %><% end %>

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>