Avoid calling can_delete_account twice

This commit is contained in:
Neil Lalonde
2014-02-13 15:51:19 -05:00
parent feb4fa3bb5
commit 42fb9d4fb1
2 changed files with 5 additions and 5 deletions

View File

@@ -56,11 +56,11 @@ class CurrentUserSerializer < BasicUserSerializer
end
def include_can_delete_account?
can_delete_account
end
def can_delete_account
scope.can_delete_user?(object)
end
def can_delete_account
true
end
end