ETahi.QuestionCheckComponent = ETahi.QuestionComponent.extend
  layoutName: 'components/question/check_component'
  multipleAdditionalData: false
  displayContent: Em.computed.alias('checked')

  checked: ((key, value, oldValue) ->
    if arguments.length > 1
      #setter
      @set('model.answer', value)
    else
      #getter
      answer = @get('model.answer')
      answer == 'true' || answer == true
  ).property('model.answer')

  actions:
    additionalDataAction: ()->
      @get('additionalData').pushObject({})

ETahi.QuestionCheckComponent = ETahi.QuestionComponent.extend
  layoutName: 'components/question/check_component'
  multipleAdditionalData: false
  displayContent: Em.computed.oneWay('checked')

  checked: ((key, value, oldValue) ->
    if arguments.length > 1
      #setter
      @set('model.answer', value)
    else
      #getter
      answer = @get('model.answer')
      answer == 'true' || answer == true
  ).property('model.answer')

  actions:
    additionalDataAction: ()->
      @get('additionalData').pushObject({})

Make the alias between checked and displayContent one way.
Make the alias between checked and displayContent one way.

displayContent shouldn't be set via handlebars for the checkbox
component.  Setting it would cause the checked computed property to
evaluate before the task value was correctly set, and the model computed
property would explode.
