Sha256: 855c730e5d410a0fd665a4e9e3419aebe91e092becd33eec5a24cbdd3052c444
Contents?: true
Size: 440 Bytes
Versions: 25
Compression:
Stored size: 440 Bytes
Contents
# frozen_string_literal: true module Decidim module Attributes # Custom attributes value to make conversion from signed id (String) to ActiveStorage::Blob easier. class Blob < ActiveModel::Type::Value def type :"decidim/attributes/blob" end private def cast_value(value) return value unless value.is_a?(String) ActiveStorage::Blob.find_signed(value) end end end end
Version data entries
25 entries across 25 versions & 1 rubygems