Class BuildURLMixin
public
Module:
@ember-data/adapter
Using BuildURLMixin
To use URL building, include the mixin when extending an adapter, and call buildURL
where needed.
The default behaviour is designed for RESTAdapter.
Example
1 2 3 4 5 6 7 8 |
import Adapter, { BuildURLMixin } from ' -data/adapter'; export default class ApplicationAdapter extends Adapter.extend(BuildURLMixin) { findRecord(store, type, id, snapshot) { var url = this.buildURL(type.modelName, id, snapshot, 'findRecord'); return this.ajax(url, 'GET'); } } |
Attributes
The host
and namespace
attributes will be used if defined, and are optional.
Methods
- buildURL
- pathForType
- urlForCreateRecord
- urlForDeleteRecord
- urlForFindAll
- urlForFindBelongsTo
- urlForFindHasMany
- urlForFindMany
- urlForFindRecord
- urlForQuery
- urlForQueryRecord
- urlForUpdateRecord
Properties
No documented items
Events
No documented items