2024-04-15 15:06:05 +02:00
|
|
|
class Champs::OptionsController < Champs::ChampController
|
2023-08-03 11:06:40 +02:00
|
|
|
include TurboChampsConcern
|
|
|
|
|
2023-03-29 23:31:13 +02:00
|
|
|
def remove
|
2024-04-15 15:06:05 +02:00
|
|
|
@champ.remove_option([params[:option]].compact, true)
|
|
|
|
@dossier = @champ.private? ? nil : @champ.dossier
|
2024-03-28 12:42:29 +01:00
|
|
|
champs_attributes = { @champ.public_id => {} }
|
2024-04-15 15:06:05 +02:00
|
|
|
@to_show, @to_hide, @to_update = champs_to_turbo_update(champs_attributes, @champ.dossier.champs)
|
2023-03-29 23:31:13 +02:00
|
|
|
end
|
|
|
|
end
|