Preserve checkbox state on Rails form validation error
<p>I'm having a checkbox which is only used to display an optional input field with JS. When submitting the form, but the value of this field fails validation, it displays the error message but not the field (because of the reload). So I would need to click the checkbox again, to actually show the field. Is there any way how I can preserve the checkbox checked after submitting the form and failing.</p>

<p>Thanks</p>