Initial commit
This commit is contained in:
11
app/models/graphics_element.rb
Normal file
11
app/models/graphics_element.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class GraphicsElement < ApplicationRecord
|
||||
belongs_to :video
|
||||
|
||||
validates :graphic_type, presence: true
|
||||
validates :text, presence: true
|
||||
validates :time_elapsed, presence: true
|
||||
|
||||
def appears_at
|
||||
Timecode.from_seconds(time_elapsed.to_f).to_s
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user