# NOTE: a Date.wday will tell you the day of week (0-6, meaning Sunday-Saturday)
day_of_week = Time.now.to_date.wday
base_period = VideoPolicy.find_by_day(day_of_week).period
# NOTE: a Date.wday will tell you the day of week (0-6, meaning Sunday-Saturday)
day_of_week = Time.now.to_date.wday
base_period = VideoPolicy.find_by_day(day_of_week).period
- 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?
+ 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?