rubocopify most parts of the application controller
Merge pull request #1139 from opf/fix/app_controller_refactorings

rubocopify most parts of the application controller