def update
    @document = Document.find(params[:id])

    version_after_update = @document.max_version + 1