class Video < Rentable
has_many :video_genres
+ has_many :medias
validates_presence_of :director
validates_presence_of :video_genre
protected
def validate
errors.add(:video_genre, "does not exist in the database") if video_genre.nil?
+ errors.add(:media, "does not exist in the database") if media.nil?
end
end