Skip to content
This repository was archived by the owner on Apr 11, 2023. It is now read-only.

Dualstorage Model without Collections #98

@damanic

Description

@damanic

I'm fresh baby bum new to backbone.js so go easy.

I have a customer profile model that I want to use dualstorage on, there is no need for a collection. It appears to me that dual storage does not work unless called through a collection. Is this correct?

As set up below, when loading a view model.fetch() does not call an ajax request with dualstorage enabled. With dual storage removed the data is called in fine.

return Backbone.View.extend({

    initialize: function () {
        this.model.fetch();
        this.model.bind('change', this.render, this);
    },

    render: function () {
        this.$el.html(template(this.model.toJSON()));
        return this;
    }
});

Do I have to set up a collection or?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions