What's a good solution to parse an RSS/ATOM feed and present the content in a Rails view?
+4
A:
I've seen good notes on the parsing part at http://www.robbyonrails.com/articles/2005/05/11/parsing-a-rss-feed (and links therefrom). How to best present things once you have parsed them is maybe a bit of a subjective issue...
Alex Martelli
2009-05-27 23:45:46
A:
id recommend acts_as_feed, which takes care of parsing automatically acts as feed rails plugin and can be added to models. Another solution would be to use google feed api as long as you only need to display the feed.
#HAML view example
- if feed.filled?
%h2="Blog: #{feed.title}"
- for item in feed.entries[0...5]
-date = item.published_at.to_date.to_s(:long)
%h2=link_to(h(item.title),h(item.url))
grosser
2009-05-28 18:59:37
Feedzirra is the best.
Shripad K
2010-04-18 10:55:53