converting posts controller to coffee