RailsCasts Pro episodes are now free!

Learn more or hide this

Fabio Mazarotto's Profile

GitHub User: henrymazza

Comments by Fabio Mazarotto

Avatar

On REVISION: 12 it's not needed anymore. obj.deleteRecord() would suffice.

Avatar

Ok. Found it!

html
<a href="#" {{action removeItem this}}>x</a>
coffeescript
Raffler.EntriesController = Ember.ArrayController.extend
  # include the following method.
  removeItem: (obj) ->
    obj.get('content').deleteRecord()
    @store.commit()

My issue was that I was not calling 'deleteRecord()' on the 'content'.

Avatar

What is the proper way to delete an Entry?