Use `button_to` helper to generate a proper logout button

This commit is contained in:
Andreas Nedbal 2022-01-15 06:28:29 +01:00 committed by Karina Kwiatek
parent 435ddf2415
commit 75b93d3535
2 changed files with 2 additions and 2 deletions

View File

@ -32,6 +32,6 @@
%i.fa.fa-fw.fa-gavel
= t('views.navigation.moderation')
.dropdown-divider
%a.dropdown-item{ href: destroy_user_session_path, data: { method: :delete } }
= button_to destroy_user_session_path, method: 'delete', class: 'dropdown-item' do
%i.fa.fa-fw.fa-sign-out
= t 'views.sessions.destroy'

View File

@ -26,6 +26,6 @@
%i.fa.fa-fw.fa-gavel
= t('views.navigation.moderation')
.dropdown-divider
%a.dropdown-item{ href: destroy_user_session_path, data: { method: :delete } }
= button_to destroy_user_session_path, method: 'delete', class: 'dropdown-item' do
%i.fa.fa-fw.fa-sign-out
= t 'views.sessions.destroy'