discourse/discourse — pull request #2173 by vikhyat (2014-03-24 17:10:48+00:00)
Title: Forgot to specify "dependent: destroy" for UserBadges

This fixes the problem when deleting a badge after assigning it to users.