               removed = true
               items.splice index, 1
 
-        callback() if callback
+        deferred.resolve()
 
-    destroyPromise = (id) ->
-      deferred = $q.defer()
-      destroy id, () ->
-        deferred.resolve()
       deferred.promise
 
     count = () ->

, ['$resource', '$q', 'giSocket'
, ($resource, $q, Socket) ->

  factory = (resourceName, usePromises, prefix, idField) ->

    if not prefix?
      prefix = '/api'

      version: version
      clearCache: clearCache

    exports

  #export the crud factory method
