feat(dossier): multiselect without react

This commit is contained in:
Paul Chavard 2023-03-29 23:31:13 +02:00
parent cd74ea46cc
commit fce78bbf30
13 changed files with 104 additions and 50 deletions

View file

@ -0,0 +1,9 @@
class Champs::OptionsController < ApplicationController
before_action :authenticate_logged_user!
def remove
@champ = policy_scope(Champ).includes(:champs).find(params[:champ_id])
@next_checkbox_id = @champ.next_checkbox_id(params[:option])
@champ.remove_option([params[:option]].compact)
end
end