Sha256: 746fb7fbb05a6c6f8334a2cb00c9419c0c770afaece86e10be732b68d6efb9fe
Contents?: true
Size: 413 Bytes
Versions: 92
Compression:
Stored size: 413 Bytes
Contents
module ContentImage DEFAULT_IMAGE = 'woople-theme/missing.png' MISSING_WOOPLE_IMAGE = '/images/original/missing.png' def image(&block) yield(normalized(__getobj__.image) || DEFAULT_IMAGE) if __getobj__.respond_to? :image end private def normalized(image) if image.is_a?(Paperclip::Attachment) && image.to_s == MISSING_WOOPLE_IMAGE DEFAULT_IMAGE else image end end end
Version data entries
92 entries across 92 versions & 1 rubygems