Created
April 22, 2012 17:55
-
-
Save mrmans0n/2465648 to your computer and use it in GitHub Desktop.
Controller that redirects a blog feed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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