dimanche 5 avril 2020

How to pass an unrelated parameter with a checkbox (Rails simpleform)?

I just want a unrelated parameter passed through the form if the user checks off a checkbox, but I'm not sure of the format. I would want 10 checkboxes, each one sending its own 'true' parameter if checked on form submit.

Ie, from the controller

if params[:checkbox1]
  remove this or that
end



Aucun commentaire:

Enregistrer un commentaire