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

Models should allow configuration of REST endpoint

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Done
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: 3.0
    • Fix Version/s: 4.0
    • Component/s: None
    • Labels:
      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

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

                Dates

                Created:
                Updated:
                Resolved:

                  Tasks

                  Progress: 
                   0/0