Quantcast
Viewing all articles
Browse latest Browse all 4837

How to save a model and ignore it's return payload

@mattmcmanus wrote:

I have a action that produces a lot of PUTs to my api for a single model. I debounce it to eliminate as many calls as possible. However, it’s still possible that the model will be changed by the user while a record is in flight. When the save finishes, the returned payload from the server overrides any changes the user may have done.

So I want the save to proceed, but I want to ignore the return payload. Right now, my thought is to grab the models snapshot and adapter and call updateRecorddirectly (rather than model.save(), but I’m wondering if there is a way to do this that doesn’t involve private snapshot apis.

Thanks for taking the time to read this, partner! Image may be NSFW.
Clik here to view.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4837

Trending Articles