Rename User#delete to User#destroy
"delete" is generally used for immediate SQL deletion without running any callbacks or other ruby code, whereas "destroy" will trigger callbacks. Although we don't currently use any callbacks, let's rename this method to align better with the convention.
This commit is contained in:
parent
bf5f2890ac
commit
a863be8831
4 changed files with 7 additions and 7 deletions
|
@ -241,8 +241,8 @@ class User < ApplicationRecord
|
|||
end
|
||||
|
||||
##
|
||||
# delete a user - leave the account but purge most personal data
|
||||
def delete
|
||||
# destroy a user - leave the account but purge most personal data
|
||||
def destroy
|
||||
avatar.purge_later
|
||||
|
||||
self.display_name = "user_#{id}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue