Skip to content

Instantly share code, notes, and snippets.

@jwoertink
Created March 13, 2013 22:21
Show Gist options
  • Select an option

  • Save jwoertink/5156939 to your computer and use it in GitHub Desktop.

Select an option

Save jwoertink/5156939 to your computer and use it in GitHub Desktop.
# string :url
class Feed < ActiveRecord::Base
validates :url, presence: true
end
class FeedsController < ApplicationController
def show
feed = Feed.find(params[:id])
@feed = Feedzirra::Feed.fetch_and_parse(feed.url)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment