     'upvote': -> DiscussionUtil.urlFor("upvote_#{@get('type')}", @id)
     'downvote': -> DiscussionUtil.urlFor("downvote_#{@get('type')}", @id)
     'endorse': -> DiscussionUtil.urlFor('endorse_comment', @id)
+    'update': -> DiscussionUtil.urlFor('update_comment', @id)
 
   permalink: ->
     thread_id = @get('thread').id

    DiscussionUtil.post $elem, url, data, (response, textStatus) =>
      @model.set('closed', not closed)

  edit: ->
    $local(".discussion-content-wrapper").hide()
    $editView = $local(".discussion-content-edit")
    if $editView.length
      $editView.show()
    else
      view = {
        id: id
        title: $local(".thread-raw-title").html()
        body: $local(".thread-raw-body").html()
        tags: $local(".thread-raw-tags").html()
      }
      @$discussionContent().append Mustache.render Discussion.editThreadTemplate, view
      Discussion.makeWmdEditor $content, $local, "thread-body-edit"
      $local(".thread-tags-edit").tagsInput Discussion.tagsInputOptions()
      $local(".discussion-submit-update").unbind("click").click -> handleSubmitEditThread(this)
      $local(".discussion-cancel-update").unbind("click").click -> handleCancelEdit(this)

    handleSubmitEditThread = (elem) ->
      url = Discussion.urlFor('update_thread', id)
      title = $local(".thread-title-edit").val()
      body = Discussion.getWmdContent $content, $local, "thread-body-edit"
      tags = $local(".thread-tags-edit").val()
      Discussion.safeAjax
        $elem: $(elem)
        url: url
        type: "POST"
        dataType: 'json'
        data: {title: title, body: body, tags: tags},
        error: Discussion.formErrorHandler($local(".discussion-update-errors"))
        success: (response, textStatus) ->
          Discussion.clearFormErrors($local(".discussion-update-errors"))
          @$discussionContent().replaceWith(response.html)
          Discussion.extendContentInfo response.content['id'], response['annotated_content_info']
          Discussion.initializeContent($content)
          Discussion.bindContentEvents($content)

  delete: ->
    if $content.hasClass("thread")

    'upvote': -> DiscussionUtil.urlFor("upvote_#{@get('type')}", @id)
    'downvote': -> DiscussionUtil.urlFor("downvote_#{@get('type')}", @id)
    'close': -> DiscussionUtil.urlFor('openclose_thread', @id)
    'update': -> DiscussionUtil.urlFor('update_thread', @id)

  initialize: ->
    @set('thread', @)
