Relative Content

Tag Archive for ruby-on-railsturbolinks

Rails (with turbo) render form in place – how to update element outside of form

I have a model with some boolean columns. I would like to edit these as checkboxes in a form with instant update every time a checkbox is clicked. I managed to do this with onchange: "this.form.requestSubmit()" on each checkbox and then rendering the form in the controller with render :edit, status: :ok so we stay on the form.