Sha256: d3dd8bd4c67136267bdb2752925c2f53f59bd39bf811657d43f9b3f84dc811f2
Contents?: true
Size: 487 Bytes
Versions: 19
Compression:
Stored size: 487 Bytes
Contents
module Spree class Image < Asset include Rails.application.config.use_paperclip ? Configuration::Paperclip : Configuration::ActiveStorage include Rails.application.routes.url_helpers def styles self.class.styles.map do |_, size| width, height = size[/(\d+)x(\d+)/].split('x') { url: polymorphic_path(attachment.variant(resize: size), only_path: true), width: width, height: height } end end end end
Version data entries
19 entries across 19 versions & 1 rubygems