Sha256: d6bc72e2da701cc17575da367a7ac11a2532437eecb4c3185171202a2429a706
Contents?: true
Size: 478 Bytes
Versions: 2
Compression:
Stored size: 478 Bytes
Contents
module DragonflyHelper def dragonfly_app Dragonfly[:images] end def sized_image(image, size) if image != nil if image.attachment.to_file != nil image_tag(dragonfly_app.fetch_file(image.attachment.to_file.path).thumb(size).url) end else noimage = File.open(File.join(Rails.root, "public", "images", "noimage", "product.jpg")) image_tag(dragonfly_app.fetch_file(noimage.path).thumb(size).url) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spree_suppliers-0.0.1 | app/helpers/dragonfly_helper.rb |
spree_suppliers-0.60.3 | app/helpers/dragonfly_helper.rb |