Add comments association
This commit is contained in:
parent
eb4d131fc5
commit
e66ad8b5ed
@ -7,6 +7,8 @@ class Asciicast < ActiveRecord::Base
|
|||||||
validates :stdout, :stdout_timing, :presence => true
|
validates :stdout, :stdout_timing, :presence => true
|
||||||
validates :terminal_columns, :terminal_lines, :duration, :presence => true
|
validates :terminal_columns, :terminal_lines, :duration, :presence => true
|
||||||
|
|
||||||
|
has_many :comments, :order => :created_at
|
||||||
|
|
||||||
def meta=(file)
|
def meta=(file)
|
||||||
data = JSON.parse(file.tempfile.read)
|
data = JSON.parse(file.tempfile.read)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user