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

Models should allow configuration of REST endpoint

    XMLWordPrintableJSON

Details

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

    Description

      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/'
      });

      Gliffy Diagrams

        Attachments

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Tasks