demarches-normaliennes/app/components/editable_champ/carte_component.rb

21 lines
502 B
Ruby
Raw Normal View History

class EditableChamp::CarteComponent < EditableChamp::EditableChampBaseComponent
2022-08-12 10:45:04 +02:00
include ApplicationHelper
def dsfr_champ_container
:fieldset
end
def initialize(**args)
super(**args)
@autocomplete_component = EditableChamp::ComboSearchComponent.new(**args)
end
def update_path
if Champ.update_by_stable_id?
champs_carte_features_path(@champ.dossier, @champ.stable_id, row_id: @champ.row_id)
else
champs_legacy_carte_features_path(@champ)
end
end
2022-08-12 10:45:04 +02:00
end