Refactor helper method to be more railsey