Add params option for button_to #10471
I'm facing exactly the situation that this pull request would solve. I have a form that displays a table. In one of the columns, I have a checkbox for each displayed item. I have several buttons, one for each possible action that can be performed on the selected items. I don't want to have to define a separate route for each action, because the selected action is more like a function parameter for one action.
The way I've solved this for now is to add some Javacode that triggers on the click of any one of the buttons (based on their class), and then copies the id of the button to a hidden input field of the form, which is then transmitted to the controller in the parameter list of the HTTP call.