I have a model that has a delete view so you can have one last change to change your mind.
The user clicks the checkbox and then submits the delete confirmation form. Have can I ensure that they did indeed check the confirm checkbox so that I can continue w/ the deletion.
I have a model that has a delete view so you can have one
Share
The simplest solution is two use an optional parameter on the destroy link. The parameter can toggle either trigger the confirmation view or let the request through to delete the model.
This way after the user clicks the check box, you can fire off another request to delete the model.
Of course, a better option would be to have the checkbox displayed via javascript. This way the user only makes one request to the server, after the delete click as been confirmed.