summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-05-23 12:27:14 +0200
committerAzul <azul@riseup.net>2016-05-23 13:01:52 +0200
commitad208ae3625e67c2551744df7906ebdda94d215e (patch)
tree45530918ef86f0d565c597a0310f858f1cb4d841 /app/models
parentf47fc9d6522886cf81cfea26ec1f396219c539ba (diff)
rename destroy_identity to release_handles
This expresses the intent rather than the implementation. Also replace temp with query refactoring.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 7310250..d722caa 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -69,15 +69,13 @@ class Account
@user.refresh_identity
end
- def destroy(destroy_identity=false)
+ def destroy(release_handles=false)
return unless @user
if !@user.is_tmp?
- if destroy_identity == false
- @user.identities.each do |id|
+ @user.identities.each do |id|
+ if release_handles == false
id.orphan!
- end
- else
- @user.identities.each do |id|
+ else
id.destroy
end
end