Ability to reset attributes of record without triggering a network request.
Typically collection record has reload function which enable getting the fresh data from the server.
// Trigger GET /resource-name/:id
record.reload()
Now, rollbackAttributes does the same thing except it get the record from the last request made that return the record.
// Does not trigger GET /resource-name/:id instead it rollback the attributes based on its last fetched or returned from any updates
record.rollbackAttributes()
Ability to reset attributes of record without triggering a network request.
Typically collection record has
reloadfunction which enable getting the fresh data from the server.Now, rollbackAttributes does the same thing except it get the record from the last request made that return the record.