urlForFindRecord (id, modelName, snapshot) String
Builds a URL for a store.findRecord(type, id)
call.
Example:
app/adapters/user.js
import DS from 'ember-data'; export default DS.JSONAPIAdapter.extend({ urlForFindRecord(id, modelName, snapshot) { let baseUrl = this.buildURL(); return `${baseUrl}/users/${snapshot.adapterOptions.user_id}/playlists/${id}`; } });
Parameters:
-
id
String
-
modelName
String
-
snapshot
DS.Snapshot
Returns:
-
String
- url
Please login to continue.