John
John

Reputation: 13705

How to parse rss in rails 3.1

How should I go about parsing rss feeds in a rails 3.1 app. Having trouble finding current resources on this topic.

Upvotes: 1

Views: 653

Answers (1)

Pavan G jakati
Pavan G jakati

Reputation: 113

You'll need this in your controller:

require 'rss'
rss = RSS::Parser.parse(open('http://example.com/feed/posts').read, false)

From Parsing an RSS feed with Ruby.

Upvotes: 1

Related Questions