Don't put this in the view. Place it in the controller.