Fix the late fee calculations
[cs356-p2-videostore.git] / app / models / video.rb
index 7739aeb..fd5d22f 100644 (file)
@@ -38,7 +38,7 @@ class Video < Rentable
 
   protected
   def validate
-    errors.add(:video_genre, "does not exist in the database") if video_genre.nil?
-    errors.add(:video_media, "does not exist in the database") if video_media.nil?
+    errors.add(:video_genre_id, "does not exist in the database") if genre.nil?
+    errors.add(:video_media_id, "does not exist in the database") if media.nil?
   end
 end