nl_tokens: Fetch the records of a given type and observe them for changes .
pl_tokens: function ( type , recordsAdded , recordsUpdated , recordsRemoved ) { var self = this , releaseMethods = Ember . A ( ) , records = this . getRecords ( type ) , release ; var recordUpdated = function ( updatedRecord ) { recordsUpdated ( [ updatedRecord ] ) ; } ; var recordsToSend = records . map ( function ( record ) { releaseMethods . push ( self . observeRecord ( <mask> , recordUpdated ) ) ; return self . wrapRecord ( record ) ; } ) ; var contentDidChange = function ( array , idx , removedCount , addedCount ) { for ( var i = idx ; i < idx + addedCount ; i ++ ) { var record = array . objectAt ( i ) ; var wrapped = self . wrapRecord ( record ) ; releaseMethods . push ( self . observeRecord ( record , recordUpdated ) ) ; recordsAdded ( [ wrapped ] ) ; } if ( removedCount ) { recordsRemoved ( idx , removedCount ) ; } } ; var observer = { didChange : contentDidChange , willChange : Ember . K } ; records . addArrayObserver ( self , observer ) ; release = function ( ) { releaseMethods . forEach ( function ( fn ) { fn ( ) ; } ) ; records . removeArrayObserver ( self , observer ) ; self . releaseMethods . removeObject ( release ) ; } ; recordsAdded ( recordsToSend ) ; this . releaseMethods . pushObject ( release ) ; return release ; }