Sha256: 73a6ade6f8e722d0e3553ce1c750f0afb4d1b52855231253771322ab426f40a2
Contents?: true
Size: 478 Bytes
Versions: 2
Compression:
Stored size: 478 Bytes
Contents
module SuppliersHelper 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/suppliers_helper.rb |
spree_suppliers-0.60.3 | app/helpers/suppliers_helper.rb |