Skip to content

Commit

Permalink
Use button_to helper to generate a proper logout button
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeldesu authored and raccube committed Jan 15, 2022
1 parent 435ddf2 commit 75b93d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/navigation/main/_profile.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
2 changes: 1 addition & 1 deletion app/views/navigation/mobile/_profile.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit 75b93d3

Please sign in to comment.