Вопрос

So, I'm using feedzirra gem (https://github.com/pauldix/feedzirra) for parsing and displaying RSS data. However, I'm having trouble displaying different feeds. The code in my view is displaying FeedEntry.all, albeit, I'd like to display several different feeds under different headers.

I'm having trouble wrapping my head around how to do this. Another way of putting it would be, how can you seperate the feeds? Anyway to seperate them by title and display them by the title?

E.G if I were to pull data from YouTube's rss (hypothetically), and Spotify's as well how could I display YouTube's rss under the YouTube header, and likewise with Spotify?

Here's the gist of it: https://gist.github.com/anonymous/5801535

Это было полезно?

Решение

Have you looked at backending your feedzirra output with a tool like data_active to convert it into an ActiveRecord structure? I am just beginning to build a similar process so I don't yet have code to show. I recognize there are some duplications here so it may be that feedzirra does the fetch and data_active does the parse.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top