G'day all.
In a Rails app I have 2 models: users and spots, with a habtm relationship and join table. In the spot/show action I can create a form to ask the current user if they have visited this current spot (checkbox) and click save to create a record in the join table.
This works well (so I know my models and relationships are all good) however is not that elegant. Is there a way to do this without having to use a checkbox and submit button? Preferably with just a button?
My research suggests the rails button_to might do it, but I can't find a working example.
Many thanks.