Skip to content

Instantly share code, notes, and snippets.

@mrmans0n
Created April 22, 2012 17:55
Show Gist options
  • Save mrmans0n/2465648 to your computer and use it in GitHub Desktop.
Save mrmans0n/2465648 to your computer and use it in GitHub Desktop.
Controller that redirects a blog feed
require 'open-uri'
class DerpController < ApplicationController
layout nil
def blog
source = "http://www.perry.es/feed/" # url (or local file) with the feed we want to show
tmp = "" # load here rss data
open(source) do |s| tmp = s.read end
@content = tmp
render :action => "blog", :layout => nil
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment