Files
old-holivud2/app/models/unreleased_appearance.rb
2020-05-31 22:38:19 +02:00

25 lines
722 B
Ruby

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