urlForCreateRecord (modelName, snapshot) String
Builds a URL for a record.save()
call when the record was created locally using store.createRecord()
.
Example:
app/adapters/application.js
import DS from 'ember-data'; export default DS.RESTAdapter.extend({ urlForCreateRecord(modelName, snapshot) { return this._super(...arguments) + '/new'; } });
Parameters:
-
modelName
String
-
snapshot
DS.Snapshot
Returns:
-
String
- url
Please login to continue.