Adding posts->update method

I have added posts->update method. Thanks for merging!