feat(dossier): multiselect without react
This commit is contained in:
parent
cd74ea46cc
commit
fce78bbf30
13 changed files with 104 additions and 50 deletions
9
app/controllers/champs/options_controller.rb
Normal file
9
app/controllers/champs/options_controller.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue