Sha256: 92e62fef94d3cb4ab1fe272d62dd0d344504d15b0ae0b312b38b00b0c7437b2a
Contents?: true
Size: 605 Bytes
Versions: 22
Compression:
Stored size: 605 Bytes
Contents
# frozen_string_literal: true # :markup: markdown module ActionText module Attachables class MissingAttachable extend ActiveModel::Naming DEFAULT_PARTIAL_PATH = "action_text/attachables/missing_attachable" def initialize(sgid) @sgid = SignedGlobalID.parse(sgid, for: ActionText::Attachable::LOCATOR_NAME) end def to_partial_path if model model.to_missing_attachable_partial_path else DEFAULT_PARTIAL_PATH end end def model @sgid&.model_name.to_s.safe_constantize end end end end
Version data entries
22 entries across 22 versions & 2 rubygems