Skip to content

Commit

Permalink
Revert "Give each Model a reference to the apiRoot"
Browse files Browse the repository at this point in the history
This reverts commit 7bfe0d7.
  • Loading branch information
uglymunky committed Apr 29, 2014
1 parent 30b99e3 commit 088c12e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/backbone.siren.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,11 @@ function request(rel) {
return _.indexOf(link.rel, rel) > -1;
});

if (link) {
return BbSiren.resolveOne(link.href);
if (! link) {
return;
}

return BbSiren.resolveOne(link.href);
}


Expand Down Expand Up @@ -831,10 +833,6 @@ _.extend(BbSiren, {
this.siren.ajaxOptions = options.ajaxOptions;
}

if (options.apiRoot) {
this.siren.apiRoot = options.apiRoot;
}

this.parseActions();
}

Expand Down Expand Up @@ -1009,7 +1007,6 @@ BbSiren.prototype = {
, resolve: function (entityPaths, options) {
options = $.extend({}, this.options, options);
options.store = this.store;
options.apiRoot = this.apiRoot;

var self = this
, urls = [];
Expand Down

0 comments on commit 088c12e

Please sign in to comment.