nl_tokens: Find related Models .
pl_tokens: function ( options ) { var related = null ; options = _ . defaults ( { parse : this . options . parse } , options ) ; // Replace 'this.related' by 'this.keyContents' if it is a Backbone.Collection if ( this . keyContents instanceof Backbone . Collection ) { this . _prepareCollection ( this . keyContents ) ; related = this . keyContents ; } // Otherwise, 'this.keyContents' should be an array of related object ids. // Re-use the current 'this.related' if it is a Backbone.Collection; otherwise, create a new collection. else { var toAdd = [ ] ; _ . each ( this . keyContents , function ( attributes ) { if ( attributes instanceof this . relatedModel ) { var model = attributes ; } else { // If `merge` is true, update models here, instead of during update. model = this . relatedModel . findOrCreate ( attributes , _ . extend ( { merge : true } , options , { create : this . options . createModels } ) ) ; } model && toAdd . push ( model ) ; } , this ) ; if ( this . related instanceof Backbone . Collection ) { related = this . related ; } else { related = this . _prepareCollection ( ) ; } // By now, both `merge` and `parse` will already have been executed for models if they were specified. // Disable them to prevent additional calls. related . set ( toAdd , _ . defaults ( { merge : false , <mask> : false } , options ) ) ; } // Remove entries from `keyIds` that were already part of the relation (and are thus 'unchanged') this . keyIds = _ . difference ( this . keyIds , _ . pluck ( related . models , 'id' ) ) ; return related ; }