Loading ...
Sorry, an error occurred while loading the content.

Is it designed such that .callback() cannot be changed after .remove()?

Expand Messages
  • elfgoh
    I am trying to initiate .callback() upon .remove() as follows: Favourite({favourite_id:{is:id}}).remove().callback(function(){ alert( moo ); }); However this
    Message 1 of 1 , Mar 21, 2013
    • 0 Attachment
      I am trying to initiate .callback() upon .remove() as follows:

      Favourite({favourite_id:{is:id}}).remove().callback(function(){
      alert('moo');
      });

      However this throws an error in the console:

      Uncaught TypeError: Object 1 has no method 'callback'

      However I have managed to successfully chain .callback() after .insert() as follows:

      Favourite.insert({
      favourite_id: id,
      type: type,
      updated: updated
      }).callback(function() {
      alert('foo');
      });

      I am unsure if this is a bug or not. Please enlighten me. Thanks in advance.


      Best regards,

      Luther
    Your message has been successfully submitted and would be delivered to recipients shortly.