I believe this has resolved the dependent destruction and we can close issue #18

This commit is contained in:
Ken Johnson
2013-06-02 13:08:56 -04:00
parent 4e445375fa
commit 06dce1f8b2
3 changed files with 8 additions and 6 deletions
+3 -1
View File
@@ -34,7 +34,9 @@ class AdminController < ApplicationController
def delete_user
user = User.find_by_user_id(params[:admin_id])
if user && !(current_user.user_id == user.user_id)
user.delete
# Call destroy here so that all association records w/ user_id are destroyed as well
# Example user.retirement records would be destroyed
user.destroy
message = true
end
respond_to do |format|