Add searching to the games controller
[cs356-p2-videostore.git] / app / models / game.rb
index 4991aa9..4c5d38c 100644 (file)
@@ -1,4 +1,8 @@
 class Game < Rentable
   validates_presence_of :game_genre
   validates_presence_of :platform
+
+  def checkedout?
+    return Coitem.find_by_id(self.id) ? true : false
+  end
 end