Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
return Time.now.advance(:days => period).to_date
end
+ protected
+ def validate
+ errors.add(:game_genre_id, "does not exist in the database") if genre.nil?
+ errors.add(:game_platform_id, "does not exist in the database") if platform.nil?
+ end
+
end
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