     declarations: ->
       {div, input, label, textarea} = React.DOM
 
-      @state.declarations.map (declaration, index) ->
+      @state.declarations.map (declaration, index) =>
         hiddenField = if 'id' in Object.keys(declaration)
           (input {
             id: "paper_declarations_attributes_#{index}_id"

          (textarea {
            ref: "declaration_answer_#{index}",
            id: "paper_declarations_attributes_#{index}_answer",
            name: "paper[declarations_attributes][#{index}][answer]",
            className: 'form-control', rows: 6
            defaultValue: declaration['answer']}),
          hiddenField])

    render: ->


      (main {}, [
        (h1 {}, @props.taskTitle),
        (RailsForm {action:  "#{@props.paperPath}.json", ref: 'form'},
          @declarations())])

    submitForm: ->
      @refs.form.submit()

    updateContent: (e) ->
      index = $(e.target).data("declarationIndex")
      newDecs = @state.declarations.slice()
      newDecs[index].answer = e.target.value
      @setState {declarations: newDecs}
