Added update method to Posts controller.