converting page controller to coffee