I'm trying to delete an object in a store collection using:
store.widgets.where(code: 'xyz').first.destroy
and get the following result from the promise:
[:@action, :@realized, :@exception, :@value, :@error, :@delayed, :@prev, :@next]
and the object is not deleted/destroyed.
Is this the right way to do it?
The problem was caused by my own (legacy) #destroy method in Object overriding the behaviour of the promise chain from
first
todestroy
.Can confirm that both
and
do work as expected.