Uploaded image for project: 'DataWolf'
  1. DataWolf
  2. WOLF-129

Models should allow configuration of REST endpoint

XMLWordPrintableJSON

    • Icon: Task Task
    • Resolution: Done
    • Icon: Normal Normal
    • 4.0
    • 3.0
    • None
    • None

      Backbone data models should expose the endpoint they wrap to make them more flexible. Instead of assuming they will be on the same machine as the editor, we can add an option such as datawolfOptions.rest = URI that gets appended to the REST endpoint. For example:

      var Person = Backbone.Model.extend({
      });

      var PersonCollection = Backbone.Collection.extend({
      model: Person,
      url: datawolfOptions.rest + '/persons/'
      });

              cnavarro Christopher Navarro
              cnavarro Christopher Navarro
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: