`button_to` generates a form with a single button inside it, that means you have a form nested in a link (`a` tag) here, which is invalid HTML. Remove the `a` tags.