Skip to content

Instantly share code, notes, and snippets.

@giosakti
Created May 8, 2013 02:59
Show Gist options
  • Save giosakti/5537889 to your computer and use it in GitHub Desktop.
Save giosakti/5537889 to your computer and use it in GitHub Desktop.
app.factory "User", ($resource, apiPrefix, AuthTokenHandler) ->
resource = $resource( apiPrefix + "/users/:id",
id: "@id"
,
update:
method: "PUT"
)
resource = AuthTokenHandler.wrapActions(resource, [
"query", "get", "save", "update", "delete"]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment