-@gradecraft.controller 'GradeCtrl', ['$rootScope', '$scope', 'GradePrototype', '$window', '$http', 'debounce', ($rootScope, $scope, GradePrototype, $window, $http, debounce) -> 
+@gradecraft.controller 'GradeCtrl', ['$rootScope', '$scope', 'GradePrototype', '$window', '$http' , ($rootScope, $scope, GradePrototype, $window, $http) -> 
 
 
   $scope.init = (params)->
     $scope.header = "waffles" 
     gradeParams = params["grade"]
     $scope.grade = new GradePrototype(gradeParams)
+    $scope.grade.addWatchers()
     gradeId = gradeParams.id
 
     $scope.froalaOptions = {

    this.raw_score = grade["raw_score"]
    this.feedback = grade["feedback"]

    # manage object state
    this.hasChanges = false

  GradePrototype.prototype = 
    change: ()->
      this.hasChanges = true

    update: ()->
      if this.hasChanges
        self = this
        $http.put("/grades/#{self.id}/async_update", self).success(
          (data,status)->
            self.resetChanges()
        )
        .error((err)->
        )

    debouncedUpdate: ()->
      debounce((->


    resetChanges: ()->
      this.hasChanges = false
<<<<<<< HEAD
=======
  }

>>>>>>> implement watchers to manage updates in grade edit controller using angular-debounce, working around fcsa-number to override internal blur actions in directive
]
