Refactored before do in controller to get rid of nil case