Update application_controller.rb

Refactor