mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
Allow the user to delete their own account
This commit is contained in:
parent
f8cf140bf4
commit
46b8d3ce9f
7 changed files with 43 additions and 8 deletions
|
|
@ -18,4 +18,14 @@ module PreferencesHelper
|
|||
pref(model, pref_name) { text_field(model, pref_name, class: "form-control") }
|
||||
end
|
||||
|
||||
def profile_delete_user(user)
|
||||
return link_to(
|
||||
t('users.destroy_user'),
|
||||
url_for({:controller => 'users', :action => 'destroy', :id => user.id}),
|
||||
{:id => "delete_user_#{user.id}",
|
||||
:class => "delete_user_button btn btn-danger",
|
||||
:title => t('users.destroy_user'),
|
||||
:x_confirm_message => t('users.destroy_confirmation', :login => user.login)
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue