Added routes, display seems to work so long as you remove the forms from the views.
[feedcatcher.git] / app / models / feed_item.rb
index db0613da3827753d0ae08c5a77984926a8463974..5b0e857b32da0fe488fa444f9fa53816da28e493 100644 (file)
@@ -1,4 +1,13 @@
 class FeedItem < ActiveRecord::Base
+  
+  def self.in_feed(name)
+    where('feed_name = ?', name)
+  end
+  
+  def self.entitled(title)
+    where('title = ?', title)
+  end
+  
   validates_presence_of :feed_name, :title, :description
   validates_uniqueness_of :title, :scope => :feed_name
   validate :feed_name_must_be_legal