def update
    @post = Post.find(params[:id])

    respond_to do |format|
      if @post.update_attributes(params[:post])