Update badges_controller.rb

Small refactor