Module: KonoUtils::Concerns::ActiveStorageRemoverHelper

Extended by:
ActiveSupport::Concern
Defined in:
lib/kono_utils/concerns/active_storage_remover_helper.rb

Overview

Includendo questo modulo nell’application record, possiamo andare injettare metodi necessari per la gestione dell’attributo virtuale per cancellare il file allegato Usage:

class Test < ApplicationRecord

has_one_attached :doc
has_one_attached_remover :doc

end

Ricordarsi di aggiungere anche nella policy il nome del campo da ritornare dalla form, il nome dell’attributo è kono_utils_purge_NOME_ATTRIBUTO

Defined Under Namespace

Modules: ClassMethods