Remove from store on successfull destroy


#1

I use destroyRecord in a delete action like this

App.PostController = Ember.ArrayController.extend
  actions:
    destroy: (post)-> post.destroyRecord()

But this is removing the post from store even if the request fail. I have a solution but i dont like it.

App.PostController = Ember.ArrayController.extend
  actions:
    destroy: (post)-> 
      post.destroyRecord().then(
        () =>, #success
        (error) => post.rollback() #error
      )

I prefer the opposite behavior, on success remove the post from store, on fail do nothing or show an error message. Is there a way to do this?