From 137ce3f8cc824c7c1f785e34f157b2c2d9c3831d Mon Sep 17 00:00:00 2001 From: drsnuggles Date: Mon, 25 Feb 2013 09:37:45 +1000 Subject: [PATCH] Replaced find_all by find - there is only one achievement to delete --- app/controllers/genotypes_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/genotypes_controller.rb b/app/controllers/genotypes_controller.rb index 2c3ed812..e9caf930 100644 --- a/app/controllers/genotypes_controller.rb +++ b/app/controllers/genotypes_controller.rb @@ -73,7 +73,7 @@ def destroy # delete Uploaded Genotyping-achievement @achievement_id = Achievement.find_by_award("Published genotyping").id - @to_delete = UserAchievement.find_all_by_achievement_id_and_user_id(@achievement_id, @user.id) + @to_delete = UserAchievement.find_by_achievement_id_and_user_id(@achievement_id, @user.id) UserAchievement.destroy(@to_delete) end redirect_to current_user