class UnreleasedAppearance < ApplicationRecord belongs_to :video validates :time_elapsed, presence: true validates :note_category, presence: true enum note_category: [:other, :missing_talent_release, :missing_appearance_release, :missing_location_release, :missing_acquired_media_license, :missing_materials_release, :missing_music_license, :logo_may_require_blurring] def note_text return notes if note_category.to_sym == :other note_category.humanize end def appears_at Timecode.from_seconds(time_elapsed.to_f).to_s end end