Update application_controller.rb

refactor