Sha256: 730078a950148115b8dd82a9239de8760eed77d09ceb3db0bb980e8bfc32d3c9
Contents?: true
Size: 515 Bytes
Versions: 27
Compression:
Stored size: 515 Bytes
Contents
module Ddr::Models module HasThumbnail extend ActiveSupport::Concern included do contains Ddr::Models::File::THUMBNAIL, class_name: "Ddr::Models::File" end def thumbnail_changed? thumbnail.content_changed? end def copy_thumbnail_from(other) if other && other.has_thumbnail? self.thumbnail.content = other.thumbnail.content self.thumbnail.mime_type = other.thumbnail.mime_type if thumbnail_changed? end thumbnail_changed? end end end
Version data entries
27 entries across 27 versions & 1 rubygems