 
   initializeModel: ->
     @model = new Comment(content: '', created_by: currentUser)
+    @bindTo @model, 'change', @render, @
 
   templateHelpers: =>
     type_of_action_text: @type_of_action_text()

    content = @$('.content').val()
    @model.set {content: content}, silent: true

  clearForm: -> @setFormContent ''

  setFormContent: (content) -> @model.set content: content

  showErrorMessage: -> @$('.js-comment-error-message').show()

  addModelSuccess: (model) ->
    @initializeModel()
    @clearForm()
    model.trigger 'change'

  addModelError: -> @showErrorMessage()


  initialize: ->
    @initializeModel()

  parseKeyUp: (e) ->
    code = e.keyCode || e.which
