Tidied whitespace
[feedcatcher.git] / app / controllers / feed_controller.rb
index 41e357a13bb90e0ff7ca0d0cc11f7f240b5a60b6..f7b8c3e9c7a8b65ba40e39e1aeff9fbc7cddf52c 100644 (file)
@@ -1,23 +1,19 @@
 class FeedController < ApplicationController
   
-  skip_before_filter :verify_authenticity_token
-
   def index
-    # @feeds = FeedItem.find(:all, :select => 'DISTINCT feed_name')
     @feeds = FeedItem.select(:feed_name).distinct
     respond_to do |format|
       format.html
       format.rss { render :layout => false }
     end
   end
-
   
   def show
     if FeedItem::valid_feed_name?(params[:feed_name])
       @feed_name = params[:feed_name]
       @feed_items = FeedItem.in_feed(@feed_name)
       respond_to do |format|
-        if @feed_items == []
+        if @feed_items.empty?
           flash[:notice] = "No items in feed #{@feed_name}"
           format.html { redirect_to index_path }
           format.rss  { render :layout => false }
@@ -35,7 +31,6 @@ class FeedController < ApplicationController
     end
   end
 
-
   def update
     if FeedItem::valid_feed_name?(params[:feed_name])
       item = FeedItem.in_feed(params[:feed_name]).entitled(params[:title]).take
@@ -60,7 +55,6 @@ class FeedController < ApplicationController
 
   # private
 
-
   private def create_item
     item = FeedItem.new(:feed_name => params[:feed_name],
       :title => params[:title],
@@ -79,7 +73,6 @@ class FeedController < ApplicationController
     end
   end
 
-
   private def update_item(item)
     if item.update_attribute(:description, params[:description])
       flash[:notice] = "Element #{params[:title]} updated"
@@ -96,7 +89,6 @@ class FeedController < ApplicationController
     end
   end
 
-
   private def destroy_item(item)
     if item.destroy
       flash[:notice] = "Element #{params[:title]} deleted"