Sha256: b5d8e776d656d844cea09fbe87a2b129f56aa03e4385d124c77dfad181accb85
Contents?: true
Size: 510 Bytes
Versions: 4
Compression:
Stored size: 510 Bytes
Contents
module Spina module ImagesHelper # We wrap some Rails logic inside our own helper method # because the resolve directive in ActiveStorage's routes # doesn't work outside the main app in 5.2.0.rc2 def variant(image, options) if image.attached? variant = image.variant(options) main_app.rails_blob_representation_path(variant.blob.signed_id, variant.variation.key, variant.blob.filename) else "https://placehold.it/100x100.png" end end end end
Version data entries
4 entries across 4 versions & 1 rubygems