 
         # save the existing model to the backend and update the model in the
         # cache to match it
-        @save: (model, httpOptions={}) ->
+        @save: (model, httpOptions={}) =>
           unless model.id?
             throw new Error "Model must have an id property to be saved"
-          
+
           httpObject = angular.extend {}, @httpConfig, httpOptions,
             method: if options.postSave then "POST" else "PUT"
-            url: @url+"/"+model.id
-            data: 
+            url: @url +"/"+model.id
+            data:
               model
 
           $http(httpObject)

              url: @url

            $http(httpObject)
            .then (successResponse) ->                
              deferred.resolve _addCollection(successResponse.data)
              _getCollectionPromise = null
            , (errorResponse) ->


        # get all the models for this resource url and store them in the cache
        # and in the collection array. By passing true into the call it will force the collection
        # to refresh and match what is in the backend.
        # There are 4 possible ways to handle getting a collection
        # case 1: a request is pending with the backend. return the existing promise
        # case 2: the collection has been loaded and we are not doing a force get return the collection array
