urlForFindBelongsTo (id, modelName, snapshot) String
Builds a URL for fetching a async belongsTo relationship when a url is not provided by the server.
Example:
app/adapters/application.js
import DS from 'ember-data'; export default DS.JSONAPIAdapter.extend({ urlForFindBelongsTo(id, modelName, snapshot) { let baseUrl = this.buildURL(id, modelName); return `${baseUrl}/relationships`; } });
Parameters:
-
id
String
-
modelName
String
-
snapshot
DS.Snapshot
Returns:
-
String
- url
Please login to continue.