How to make set disconnect after saving the model for the first time

I use backbone.js and rails. When backbone.js saves the model for the first time, the rails respond with a new id and backbone.js makes a set on the model with a new id.

http://documentcloud.github.com/backbone/docs/backbone.html#section-41

My problem: I cannot make this set silent. This set fires a change event that triggers the rendering of my view.

+6
source share
1 answer

You can pass an option in the save method, so as not to trigger any events

model.save(null, { silent: true }) 
+18
source

Source: https://habr.com/ru/post/904762/


All Articles