demarches-normaliennes/app/components/editable_champ/dossier_link_component.rb
2024-08-22 09:26:48 +02:00

11 lines
290 B
Ruby

# frozen_string_literal: true
class EditableChamp::DossierLinkComponent < EditableChamp::EditableChampBaseComponent
def dsfr_input_classname
'fr-input'
end
def dossier
@dossier ||= @champ.blank? ? nil : Dossier.visible_by_administration.find_by(id: @champ.to_s)
end
end