Skip to content

Instantly share code, notes, and snippets.

@johngag
Created November 30, 2012 23:06
Show Gist options
  • Save johngag/4179345 to your computer and use it in GitHub Desktop.
Save johngag/4179345 to your computer and use it in GitHub Desktop.
class HomeController < ApplicationController
def index @posts = RSS::Parser.parse(open('http://johngag.tumblr.com/rss').read, false).items
end
end
<%= link_to post.title, post.link, :target => "_parent" %>
<%= render :partial => "home/post", :collection => @posts.first(5) %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment