In my application, I’ve a ‘warehouse‘ model that own several fields such as id,name,description, etc, and a boolean field called ‘done’.
In my view, I want to insert a button or link field,which, when clicked, should set (through HTTP POST method) warehouse.done = true
How can I do this?
Notes: User cannot input warehouse.done field so I suppose to pass it to application as hidden field
I made a couple of assumptions on the views, controller.
html
js
warehouse_controller.rb