Module: Ddr::Models::HasThumbnail
Instance Method Summary collapse
Instance Method Details
#copy_thumbnail_from(other) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/ddr/models/has_thumbnail.rb', line 13 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 |
#thumbnail_changed? ⇒ Boolean
9 10 11 |
# File 'lib/ddr/models/has_thumbnail.rb', line 9 def thumbnail_changed? thumbnail.content_changed? end |