采取以下措施:
FooController = Ember.ObjectController.extend
# Model is set, view is rendered, button is clicked
someDeleteAction: ->
# Object is destroyed & removed from view
@get('content').deleteRecord();
# Uh-oh... error happens here, but object
# remains 'deleted' according to ember
@get('content.transaction').commit();
有没有办法防止对象被破坏并从视图中删除?
加分点:在 1 到中国水酷刑的范围内......有多有趣ember-data
?