diff --git a/app/views/actions/_pin.html.haml b/app/views/actions/_pin.html.haml index c6d6c4bc..41a1fa59 100644 --- a/app/views/actions/_pin.html.haml +++ b/app/views/actions/_pin.html.haml @@ -1,12 +1,12 @@ - if answer.pinned? - = button_to unpin_answer_path(id: answer.id), + = button_to unpin_answer_path(username: current_user.screen_name, id: answer.id), class: "dropdown-item", method: :delete, form: { id: "ab-pin-#{answer.id}", data: { turbo_stream: true } } do %i.fa.fa-fw.fa-thumbtack = t(".unpin") - else - = button_to pin_answer_path(id: answer.id), + = button_to pin_answer_path(username: current_user.screen_name, id: answer.id), class: "dropdown-item", method: :post, form: { id: "ab-pin-#{answer.id}", data: { turbo_stream: true } } do