Backbone model.save() not calling either error or success callbacks

后端 未结 4 1889
走了就别回头了
走了就别回头了 2020-12-05 06:13

I\'m trying to update a record in DB so I\'m defining model with data and calling .save() method. The PUT request is triggered and the database entry is updated. The problem

4条回答
  •  难免孤独
    2020-12-05 06:50

    Just found similar problem where the issue was solved. You have to put something as first parameter (I put null since my model was already populated with data explicitly) and object with callbacks as second. So something like;

    sessionsModel.save(null, {success:function() {} });
    

提交回复
热议问题