Skip to content

Commit

Permalink
Replaced find_all by find - there is only one achievement to delete
Browse files Browse the repository at this point in the history
  • Loading branch information
philippbayer committed Feb 24, 2013
1 parent bc4fb5a commit 137ce3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/genotypes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 137ce3f

Please sign in to comment.