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

Angular update method not working #9

Open
bjartek opened this issue Sep 15, 2013 · 6 comments
Open

Angular update method not working #9

bjartek opened this issue Sep 15, 2013 · 6 comments

Comments

@bjartek
Copy link
Contributor

bjartek commented Sep 15, 2013

Angular's ngResources uses a POST request to run the update operation but that is not supported by the routes in AutoSourceController.

PUT is the correct method to use here IIRC, but it would be nice if POST with an id was supported as well since it would make it easer to use the framework with angular.

Something like:
case ("POST", Id(id)) => withId(id, update)

in AutoSourceController

@bjartek
Copy link
Contributor Author

bjartek commented Sep 16, 2013

Another way to get this to work is using the my.resource from this article: http://kirkbushell.me/angular-js-using-ng-resource-in-a-more-restful-manner/

That is IMHO a better way since the API is then correct and it works seamlessly.

@mandubian
Copy link
Owner

completely agree!
I prefer having a purer API.
Thanks for contrib!
Do you use Autosource ?

On Mon, Sep 16, 2013 at 2:54 PM, Bjarte S. Karlsen <[email protected]

wrote:

Another way to get this to work is using the my.resource from this
article:
http://kirkbushell.me/angular-js-using-ng-resource-in-a-more-restful-manner/

That is IMHO a better way since the API is then correct and it works
seamlessly.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-24507423
.

@bjartek
Copy link
Contributor Author

bjartek commented Sep 16, 2013

I am just playing around with autosource atm. Will probably use it in some free time projects for now.

@bjartek bjartek closed this as completed Sep 16, 2013
@mandubian
Copy link
Owner

cool!
I expect to release a 1.0 version when Play 2.2 is out... then each DB
implementation will evolve on 1.x custom versions

On Mon, Sep 16, 2013 at 3:09 PM, Bjarte S. Karlsen <[email protected]

wrote:

I am just playing around with autosource atm. Will probably use it in some
free time projects for now.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-24508259
.

@bjartek
Copy link
Contributor Author

bjartek commented Sep 16, 2013

Nice! Keep up the good work.

@bjartek
Copy link
Contributor Author

bjartek commented Sep 16, 2013

Come to think of it, should we not modify the example in the README so that it mentions this? I can try to send a Pull Request later today if you do not have time to fix it.

@bjartek bjartek reopened this Sep 16, 2013
mandubian added a commit that referenced this issue Jun 27, 2014
fixed README to use my.resources that will support PUT updates #9
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

2 participants