14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/zencodable.rb', line 14
def has_video_encodings target_association, options = {}
self.encoding_options = options
self.encoder_output_files_association = target_association
has_many self.encoder_output_files_association, :dependent => :destroy
unless options[:thumbnails].blank?
self.encoder_thumbnails_association = "#{target_association.to_s.singularize}_thumbnails".to_sym
has_many self.encoder_thumbnails_association, :dependent => :destroy
end
before_save :create_job
end
|