Skip to content

Instantly share code, notes, and snippets.

@AdrienGiboire
Created July 19, 2013 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdrienGiboire/6037663 to your computer and use it in GitHub Desktop.
Save AdrienGiboire/6037663 to your computer and use it in GitHub Desktop.
class ApplicationController < ActionController::Base
protect_from_forgery
before_filter :define_rss_feed
def define_rss_feed
@blogposts = RSS::Parser.parse(open('http://www.jerevedunemaison.com/feed').read, false).items[0,1,2]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment