restangular icon indicating copy to clipboard operation
restangular copied to clipboard

Use method save()

Open MEChasle opened this issue 10 years ago • 5 comments

Hi, I would like to use save() on restangularized element. 1 - I saw this issue https://github.com/mgonto/restangular/issues/697. When will it be merged ? 2 - I think it will be easier to use if save() was based on object.id.

var myCar = {};
// Do restangularizeElement
myObject.save() // Do a POST request on '/car'

var myObject = {id: 1};
// Do restangularizeElement
myObject.save() // Do a PUT request on '/car/1'

What do you think about it ?

Thanks for your reply

MEChasle avatar Sep 14 '15 13:09 MEChasle

+1

lusabo avatar Sep 17 '15 20:09 lusabo

+1

akoppela avatar Oct 22 '15 15:10 akoppela

+1

k1ng440 avatar Jun 19 '16 19:06 k1ng440

It should've been merged awhile ago, but mgonto has left the project as the primary author, so myself and a few others have been trying to maintain it. I will do my best to try to get this reviewed, but time is limited :(

daviesgeek avatar Jun 19 '16 21:06 daviesgeek

oh man, why he has left this awesome project :(

k1ng440 avatar Jun 20 '16 09:06 k1ng440