Sha256: 06cd22df4f26621ceeb0e0d624b38b835217dd50b4ac444cf0b25bade8a69978
Contents?: true
Size: 663 Bytes
Versions: 1
Compression:
Stored size: 663 Bytes
Contents
module Resizing::Rails class Video < ApplicationRecord serialize :data, JSON %w( id project_id state source_uri deleted_at s3_presigned_url converted_uri created_at updated_at upload_completed_url self_url m3u8_url hevc_url avc_url thumbnail_url job_state ).each do |name| define_method "data_#{name}" do self.data[name] end end def self_path Resizing::Rails.railtie_routes_url_helpers.video_path(self) end def as_json *args hash = super(*args) hash.merge(self_path: self_path) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
resizing-rails-0.1.0.pre | app/models/resizing/rails/video.rb |