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
|
|
|
|
champs_attributes = params[:champ_id].present? ? { @champ.id => true } : { @champ.public_id => { with_public_id: true } }
|
|
|
|
@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
|