Convert index controller to coffee