mandubian / play-autosource

Play Autosource : 1mn REST/Crud/Async/Typesafe Datasource for Play Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Angular update method not working

bjartek opened this issue · comments

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

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.

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 <notifications@github.com

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
.

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

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 <notifications@github.com

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
.

Nice! Keep up the good work.

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.