Make system unable to check out already checked out items
[cs356-p2-videostore.git] / app / models / game.rb
index 9880b04..872b45a 100644 (file)
@@ -1,7 +1,15 @@
-class Game < ActiveRecord::Base
-  has_one :rentable
-
-  validates_presence_of :title
-  validates_presence_of :genre
+class Game < Rentable
+  validates_presence_of :game_genre
   validates_presence_of :platform
+
+  def calculated_price
+    # FIXME: generate this based on day of week, newrelase
+    return 11
+  end
+
+  def due_date
+    # FIXME: generate this based on the day of week, newrelease
+    return Time.now.advance(:days => 2).to_date
+  end
+
 end