class FeedsController < ApplicationController
# Show all feeds
def index
@feeds = Feed.order("title").all
end
# Show a single feed
def show
@feed = Feed.find(params[:id])
render :layout => false
def refresh
@feed.fetch!
redirect_to :action => :show, :notice => "Add the feed"
def create
@feed = Feed.import(params[:feed][:url])
redirect_to :action => :index, :notice => "Add the feed"
def destroy
Feed.find(params[:id]).destroy
render :nothing => true, :status => :ok
def errors
@errors = Feed.find(params[:id]).errors
def import
#fh = File.open(Rails.root.join("public", "uploads", params[:importer][:import_file].original_filename))
# TODO: Hier gehts weiter