Sha256: 589854a3b897f58de8e0ea77d2557548c2c5bc080ca14de840731441791af903
Contents?: true
Size: 1.18 KB
Versions: 22
Compression:
Stored size: 1.18 KB
Contents
module Pageflow class TextTrackFile < ApplicationRecord include HostedFile processing_state_machine do state 'processing' state 'processed' state 'processing_failed' event :process do transition any => 'processing' end job ProcessFileJob do on_enter 'processing' result :ok, state: 'processed' result :error, state: 'processing_failed' end end has_attached_file(:processed_attachment, Pageflow.config.paperclip_s3_default_options .merge(styles: { vtt: { format: 'vtt', processors: [:pageflow_vtt], s3_headers: { 'Content-Type' => 'text/vtt' } } })) def ready? processed? end def unprocessed_attachment attachment_on_s3 end def meta_data_attributes=(attributes) self.attributes = attributes.symbolize_keys.slice(:label, :kind, :srclang) end end end
Version data entries
22 entries across 22 versions & 1 rubygems