I am very new to Backbone.js. So, please excuse my ignorance. From what I understand, the with backbone.offline data in localstorage is supposed to sync automatically when fetch() is called. For some reason, this isn't working for me.
However, when I manually call this.storage.sync.push() or @storage.sync.push it works great. My model without the manual call for the push looks something like this:
Backbone is sitting on top of a Rails 3.2 app, and, if it would be helpful at all, I used rails-backbone to generate the initial scaffold for the backbone app.
I am very new to Backbone.js. So, please excuse my ignorance. From what I understand, the with
backbone.offline
data in localstorage is supposed to sync automatically whenfetch()
is called. For some reason, this isn't working for me.However, when I manually call
this.storage.sync.push()
or@storage.sync.push
it works great. My model without the manual call for the push looks something like this:To add the manual call for the push I change my MyModelsCollection to look like this:
Backbone is sitting on top of a Rails 3.2 app, and, if it would be helpful at all, I used rails-backbone to generate the initial scaffold for the backbone app.