Class: Pageflow::TextTrackFile
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Pageflow::TextTrackFile
- Includes:
- HostedFile, ProcessedFileStateMachine
- Defined in:
- app/models/pageflow/text_track_file.rb
Instance Method Summary collapse
- #attachment_styles(_attachment) ⇒ Object
-
#attachments_path_name ⇒ Object
used in paperclip initializer to interpolate the storage path needs to be “processed_attachments” for text tracks for legacy reasons.
- #meta_data_attributes=(attributes) ⇒ Object
Methods included from ProcessedFileStateMachine
#failed?, #ready?, #retry!, #retryable?
Methods included from HostedFile
#attachment, #attachment=, #attachment_default_url, #basename, #can_upload?, #failed?, #original_url, #ready?, #retryable?, #url
Methods included from UploadedFile
#cache_key, #can_upload?, #direct_upload_config, #file_type, #nested_files, #parent_allows_type_for_nesting, #parent_belongs_to_same_entry
Instance Method Details
#attachment_styles(_attachment) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/models/pageflow/text_track_file.rb', line 6 def () { vtt: { format: 'vtt', processors: [:pageflow_vtt], s3_headers: { 'Content-Type' => 'text/vtt' } } } end |
#attachments_path_name ⇒ Object
used in paperclip initializer to interpolate the storage path needs to be “processed_attachments” for text tracks for legacy reasons
20 21 22 |
# File 'app/models/pageflow/text_track_file.rb', line 20 def 'processed_attachments' end |
#meta_data_attributes=(attributes) ⇒ Object
24 25 26 |
# File 'app/models/pageflow/text_track_file.rb', line 24 def (attributes) self.attributes = attributes.symbolize_keys.slice(:label, :kind, :srclang) end |