Skip to content

Commit

Permalink
[doc] Update links to Ember Guide (#5250)
Browse files Browse the repository at this point in the history
* Update links to Ember Guide

* Update inverse-test.js

(cherry picked from commit 741f01c)
  • Loading branch information
sandstrom authored and hjdivad committed Nov 7, 2017
1 parent e45e0f1 commit 3b3e325
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions addon/-private/system/model/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ Model.reopenClass({
} else {
//No inverse was specified manually, we need to use a heuristic to guess one
if (propertyMeta.parentType && propertyMeta.type === propertyMeta.parentType.modelName) {
warn(`Detected a reflexive relationship by the name of '${name}' without an inverse option. Look at https://emberjs.com/guides/models/defining-models/#toc_reflexive-relation for how to explicitly specify inverses.`, false, {
warn(`Detected a reflexive relationship by the name of '${name}' without an inverse option. Look at https://guides.emberjs.com/current/models/relationships/#toc_reflexive-relations for how to explicitly specify inverses.`, false, {
id: 'ds.model.reflexive-relationship-without-inverse'
});
}
Expand All @@ -1337,15 +1337,15 @@ Model.reopenClass({
});

assert("You defined the '" + name + "' relationship on " + this + ", but you defined the inverse relationships of type " +
inverseType.toString() + " multiple times. Look at https://emberjs.com/guides/models/defining-models/#toc_explicit-inverses for how to explicitly specify inverses",
inverseType.toString() + " multiple times. Look at https://guides.emberjs.com/current/models/relationships/#toc_explicit-inverses for how to explicitly specify inverses",
filteredRelationships.length < 2);

if (filteredRelationships.length === 1 ) {
possibleRelationships = filteredRelationships;
}

assert("You defined the '" + name + "' relationship on " + this + ", but multiple possible inverse relationships of type " +
this + " were found on " + inverseType + ". Look at https://emberjs.com/guides/models/defining-models/#toc_explicit-inverses for how to explicitly specify inverses",
this + " were found on " + inverseType + ". Look at https://guides.emberjs.com/current/models/relationships/#toc_explicit-inverses for how to explicitly specify inverses",
possibleRelationships.length === 1);

inverseName = possibleRelationships[0].name;
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/inverse-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ testInDebug("Errors out if you define 2 inverses to the same model", function(as

assert.expectAssertion(() => {
User.inverseFor('job', store);
}, "You defined the 'job' relationship on user, but you defined the inverse relationships of type job multiple times. Look at https://emberjs.com/guides/models/defining-models/#toc_explicit-inverses for how to explicitly specify inverses");
}, /^You defined the 'job' relationship on user, but you defined the inverse relationships of type job multiple times/i);
});


Expand Down

0 comments on commit 3b3e325

Please sign in to comment.