       false
 
     saveNewAuthor: (newAuthor) ->
+      newAuthor.position = @get('authors.length') + 1
       author = @store.createRecord('author', newAuthor)
       author.set('authorGroup', @get('model'))
       author.save().then (author) =>

    op = {add: 'incrementProperty', remove: 'decrementProperty'}
    relevantAuthors.invoke(op[operation], 'position')

  actions:
    toggleAuthorForm: (authorGroup=null) ->
      @set('currentAuthorGroup', authorGroup)

      author.destroyRecord().then (author) =>
        @updateAuthorPositions(author, @get('authors'), 'remove')

    changeAuthorGroup: (author, newPosition) ->
      if author.get('authorGroup') == @get('model')
        @shiftAuthorPositions(author, @get('model.authors'), author.get('position'), newPosition)
      else
        @updateAuthorPositions(author, author.get('authorGroup.authors'), 'remove')
        author.set('authorGroup', @get('model'))
        author.set('position', newPosition)
        author.save()
        @updateAuthorPositions(author, @get('authors'), 'add')
