I'm trying to add a class with button_to in Rails, but I keep getting syntax errors. This is what I've got:
<%= button_to "Update this task", user_task_path(current_user, task), method: "patch", remote: true, {class: "update"} %>
I've tried putting various things in and out of braces but I can't get it to work. Any ideas?