Sha256: ae98ce24df6a80ed5831dd457bb43d80c154efc01a45cde3cc35734b1cbb8421
Contents?: true
Size: 624 Bytes
Versions: 31
Compression:
Stored size: 624 Bytes
Contents
# frozen_string_literal: true module Alchemy module Admin module AttachmentsHelper include Alchemy::Admin::BaseHelper include Alchemy::Filetypes def mime_to_human(mime) Alchemy.t(mime, scope: "mime_types", default: Alchemy.t(:document)) end def attachment_preview_size(attachment) case attachment.file_mime_type when *IMAGE_FILE_TYPES then "600x475" when *AUDIO_FILE_TYPES then "600x190" when *VIDEO_FILE_TYPES then "600x485" when "application/pdf" then "600x600" else "600x145" end end end end end
Version data entries
31 entries across 31 versions & 1 rubygems