Update events_helper.rb

Refactor