Currently, I am working on a personal project and have thought of an interesting concept.
Is it possible to use a button as a toggle within a form_for in order to set a boolean value in the database? My goal is to display a green button if the boolean is true and a red button if it is false.
When I click the button, I want it to change color and value. Upon submitting the form, I would like the updated value to be passed to the create method
Do you have any suggestions or ideas on how to achieve this?