Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP PATCH support #21

Open
vjpr opened this issue Jun 9, 2013 · 1 comment
Open

HTTP PATCH support #21

vjpr opened this issue Jun 9, 2013 · 1 comment

Comments

@vjpr
Copy link

vjpr commented Jun 9, 2013

No description provided.

@vjpr
Copy link
Author

vjpr commented Jun 9, 2013

The following doesn't work because a trailing slash is appended like so: /api/links/:id/

map.namespace 'api', (api) ->
    api.resources 'links', (links) ->
      links.patch '', 'links#patch'
    api.resources 'users'

Workaround:

map.namespace 'api', (api) ->
    api.resources 'links', (links) ->
    api.patch 'links/:id', 'links#patch'
    api.resources 'users'

Ideal solution:

Some way to modify availableRoutes in #getActiveRoutes

Also:

Allow null or optional first arg to be passed to a Map indicating a root resource.

map.namespace 'api', (api) ->
    api.resources 'links', (links) ->
      links.patch null, 'links#patch'
    api.resources 'users'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant