Skip to content

Only the first part of URL is used for the namespace #50

@gkorland

Description

@gkorland

In my case (and I it's very common when you have complex model) the url looks like this: /users/profiles/categories/{cat_id}

But Backbone.iosync only uses the first part as a namespace:

if (params.url) {
    params.url = _.result(params, 'url');
  } else {
    params.url = _.result(model, 'url') || urlError();
  }

  var cmd = params.url.split('/')
    , namespace = (cmd[0] !== '') ? cmd[0] : cmd[1]; // if leading slash, ignore

Which means all models which have a URL that starts with /users/... loose the rest of the URL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions