This repository has been archived on 2021-07-13. You can view files and clone it, but cannot push or open issues or pull requests.
feedfu/app/controllers/feeds_controller.rb

21 lines
376 B
Ruby
Raw Normal View History

class FeedsController < ApplicationController
2012-04-08 04:04:37 +02:00
# Show all feeds
def index
@feeds = Feed.all
end
# Show a single feed
def show
@items = Feed.find(params[:id]).items
end
def load_item
@item = Item.find(params[:id])
end
def create
@feed = Feed.import(params[:feed][:url])
redirect_to :action => :index, :notice => "Add the feed"
end
end