On page 78, the author discusses calling model.destroyRecord() & model.rollback() in the resetController hook in app/routes/friends/new.js and app/routes/friends/edit.js to get rid of unsaved new records and unsaved edits in the store respectively. Instead of calling these functions in the resetController hook, can these be called from the cancel() action in app/controller/friends/new.js & app/controller/friends/edit.js instead? If not, why?
On page 78, the author discusses calling model.destroyRecord() & model.rollback() in the resetController hook in app/routes/friends/new.js and app/routes/friends/edit.js to get rid of unsaved new records and unsaved edits in the store respectively. Instead of calling these functions in the resetController hook, can these be called from the cancel() action in app/controller/friends/new.js & app/controller/friends/edit.js instead? If not, why?