Skip to content

Commit

Permalink
Merge pull request #5592 from kennethlarsen/feature/grammar-corrections
Browse files Browse the repository at this point in the history
Grammar fixes
  • Loading branch information
runspired authored Aug 27, 2018
2 parents 3c2a1f1 + ae9c3f3 commit cca9219
Show file tree
Hide file tree
Showing 21 changed files with 63 additions and 63 deletions.
2 changes: 1 addition & 1 deletion addon/-legacy-private/system/many-array.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import diffArray from './diff-array';
property to be set to the post that contained
the has-many.
We call the record to which a relationship belongs the
We call the record to which a relationship belongs-to the
relationship's _owner_.
@class ManyArray
Expand Down
6 changes: 3 additions & 3 deletions addon/-legacy-private/system/model/states.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ import { assert } from '@ember/debug';
it would be in the `root.loaded.created.uncommitted` state. If a
record has had local modifications made to it that are in the
process of being saved, the record would be in the
`root.loaded.updated.inFlight` state. (This state paths will be
`root.loaded.updated.inFlight` state. (This state path will be
explained in more detail below.)
Events are sent by the record or its store to the record's
`currentState` property. How the state reacts to these events is
dependent on which state it is in. In some states, certain events
will be invalid and will cause an exception to be raised.
States are hierarchical and every state is a substate of the
States are hierarchical and every state is a sub-state of the
`RootState`. For example, a record can be in the
`root.deleted.uncommitted` state, then transition into the
`root.deleted.uncommitted` state then transitions into the
`root.deleted.inFlight` state. If a child state does not implement
an event handler, the state manager will attempt to invoke the event
on all parent states until the root state is reached. The state
Expand Down
6 changes: 3 additions & 3 deletions addon/-legacy-private/system/references/belongs-to.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Reference from './reference';
import { assertPolymorphicType } from 'ember-data/-debug';

/**
A BelongsToReference is a low level API that allows users and
A BelongsToReference is a low-level API that allows users and
addon author to perform meta-operations on a belongs-to
relationship.
Expand Down Expand Up @@ -314,7 +314,7 @@ export default class BelongsToReference extends Reference {
}

/**
Loads a record in a belongs to relationship if it is not already
Loads a record in a belongs to-relationship if it is not already
loaded. If the relationship is already loaded this method does not
trigger a new load.
Expand Down Expand Up @@ -366,7 +366,7 @@ export default class BelongsToReference extends Reference {
/**
Triggers a reload of the value in this relationship. If the
remoteType is `"link"` Ember Data will use the relationship link to
reload the relationship. Otherwise it will reload the record by its
reload the relationship. Otherwise, it will reload the record by its
id.
Example
Expand Down
6 changes: 3 additions & 3 deletions addon/-legacy-private/system/references/has-many.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { DEBUG } from '@glimmer/env';
import { assertPolymorphicType } from 'ember-data/-debug';

/**
A HasManyReference is a low level API that allows users and addon
A HasManyReference is a low-level API that allows users and addon
author to perform meta-operations on a has-many relationship.
@class HasManyReference
Expand Down Expand Up @@ -107,7 +107,7 @@ export default class HasManyReference extends Reference {
}

/**
`ids()` returns an array of the record ids in this relationship.
`ids()` returns an array of the record IDs in this relationship.
Example
Expand Down Expand Up @@ -147,7 +147,7 @@ export default class HasManyReference extends Reference {
}

/**
The meta data for the has-many relationship.
The metadata for the has-many relationship.
Example
Expand Down
2 changes: 1 addition & 1 deletion addon/-legacy-private/system/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const {
[createRecord](#method_createRecord) is used for creating new
records on the client side. This will return a new record in the
`created.uncommitted` state. In order to persist this record to the
backend you will need to call `record.save()`.
backend, you will need to call `record.save()`.
[push](#method_push) is used to notify Ember Data's store of new or
updated records that exist in the backend. This will return a record
Expand Down
20 changes: 10 additions & 10 deletions addon/-private/adapters/build-url-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { pluralize } from 'ember-inflector';

/**
WARNING: This interface is likely to change in order to accomodate https://github.com/emberjs/rfcs/pull/4
WARNING: This interface is likely to change in order to accommodate [RFC: Ember Data url templates](https://github.com/emberjs/rfcs/pull/4)
## Using BuildURLMixin
To use url building, include the mixin when extending an adapter, and call `buildURL` where needed.
To use URL building, include the mixin when extending an adapter, and call `buildURL` where needed.
The default behaviour is designed for RESTAdapter.
### Example
Expand Down Expand Up @@ -41,7 +41,7 @@ export default Mixin.create({
If an ID is specified, it adds the ID to the path generated
for the type, separated by a `/`.
When called by RESTAdapter.findMany() the `id` and `snapshot` parameters
When called by `RESTAdapter.findMany()` the `id` and `snapshot` parameters
will be arrays of ids and snapshots.
@method buildURL
Expand Down Expand Up @@ -221,9 +221,9 @@ export default Mixin.create({
},

/**
Builds a URL for coalesceing multiple `store.findRecord(type, id)`
Builds a URL for coalescing multiple `store.findRecord(type, id)`
records into 1 request when the adapter's `coalesceFindRequests`
property is true.
property is `true`.
Example:
Expand All @@ -249,7 +249,7 @@ export default Mixin.create({
},

/**
Builds a URL for fetching a async hasMany relationship when a url
Builds a URL for fetching an async `hasMany` relationship when a URL
is not provided by the server.
Example:
Expand All @@ -276,7 +276,7 @@ export default Mixin.create({
},

/**
Builds a URL for fetching a async belongsTo relationship when a url
Builds a URL for fetching an async `belongsTo` relationship when a url
is not provided by the server.
Example:
Expand Down Expand Up @@ -328,7 +328,7 @@ export default Mixin.create({
},

/**
Builds a URL for a `record.save()` call when the record has been update locally.
Builds a URL for a `record.save()` call when the record has been updated locally.
Example:
Expand Down Expand Up @@ -426,8 +426,8 @@ export default Mixin.create({
### Pathname customization
For example if you have an object LineItem with an
endpoint of "/line_items/".
For example, if you have an object `LineItem` with an
endpoint of `/line_items/`.
```app/adapters/application.js
import DS from 'ember-data';
Expand Down
18 changes: 9 additions & 9 deletions addon/-private/adapters/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const PRIMARY_ATTRIBUTE_KEY = 'base';
- `DS.ServerError`
To create a custom error to signal a specific error state in communicating
with an external API, extend the `DS.AdapterError`. For example if the
with an external API, extend the `DS.AdapterError`. For example, if the
external API exclusively used HTTP `503 Service Unavailable` to indicate
it was closed for maintenance:
Expand Down Expand Up @@ -110,16 +110,16 @@ AdapterError.extend = extendFn(AdapterError);
/**
A `DS.InvalidError` is used by an adapter to signal the external API
was unable to process a request because the content was not
semantically correct or meaningful per the API. Usually this means a
record failed some form of server side validation. When a promise
semantically correct or meaningful per the API. Usually, this means a
record failed some form of server-side validation. When a promise
from an adapter is rejected with a `DS.InvalidError` the record will
transition to the `invalid` state and the errors will be set to the
`errors` property on the record.
For Ember Data to correctly map errors to their corresponding
properties on the model, Ember Data expects each error to be
a valid json-api error object with a `source/pointer` that matches
the property name. For example if you had a Post model that
a valid JSON-API error object with a `source/pointer` that matches
the property name. For example, if you had a Post model that
looked like this.
```app/models/post.js
Expand Down Expand Up @@ -157,9 +157,9 @@ AdapterError.extend = extendFn(AdapterError);
```
Your backend may use different property names for your records the
store will attempt extract and normalize the errors using the
store will attempt to extract and normalize the errors using the
serializer's `extractErrors` method before the errors get added to
the the model. As a result, it is safe for the `InvalidError` to
the model. As a result, it is safe for the `InvalidError` to
wrap the error payload unaltered.
@class InvalidError
Expand Down Expand Up @@ -221,7 +221,7 @@ export const AbortError = extend(AdapterError, 'The adapter operation was aborte
API was rejected because authorization is required and has failed or has not
yet been provided.
An example use case would be to redirect the user to a log in route if a
An example use case would be to redirect the user to a login route if a
request is unauthorized:
```app/routes/application.js
Expand Down Expand Up @@ -304,7 +304,7 @@ export const NotFoundError = extend(AdapterError, 'The adapter could not find th
A `DS.ConflictError` equates to a HTTP `409 Conflict` response status.
It is used by an adapter to indicate that the request could not be processed
because of a conflict in the request. An example scenario would be when
creating a record with a client generated id but that id is already known
creating a record with a client-generated ID but that ID is already known
to the external API.
@class ConflictError
Expand Down
2 changes: 1 addition & 1 deletion addon/-private/system/model/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ export default ArrayProxy.extend(Evented, {
},

/**
Checks if there is error messages for the given attribute.
Checks if there are error messages for the given attribute.
```app/routes/user/edit.js
import Route from '@ember/routing/route';
Expand Down
2 changes: 1 addition & 1 deletion addon/-private/system/references/record.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { resolve } from 'rsvp';
import Reference from './reference';

/**
An RecordReference is a low level API that allows users and
An RecordReference is a low-level API that allows users and
addon author to perform meta-operations on a record.
@class RecordReference
Expand Down
2 changes: 1 addition & 1 deletion addon/-record-data-private/system/many-array.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import diffArray from './diff-array';
property to be set to the post that contained
the has-many.
We call the record to which a relationship belongs the
We call the record to which a relationship belongs-to the
relationship's _owner_.
@class ManyArray
Expand Down
6 changes: 3 additions & 3 deletions addon/-record-data-private/system/model/states.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ import { assert } from '@ember/debug';
it would be in the `root.loaded.created.uncommitted` state. If a
record has had local modifications made to it that are in the
process of being saved, the record would be in the
`root.loaded.updated.inFlight` state. (This state paths will be
`root.loaded.updated.inFlight` state. (This state path will be
explained in more detail below.)
Events are sent by the record or its store to the record's
`currentState` property. How the state reacts to these events is
dependent on which state it is in. In some states, certain events
will be invalid and will cause an exception to be raised.
States are hierarchical and every state is a substate of the
States are hierarchical and every state is a sub-state of the
`RootState`. For example, a record can be in the
`root.deleted.uncommitted` state, then transition into the
`root.deleted.uncommitted` state then transitions into the
`root.deleted.inFlight` state. If a child state does not implement
an event handler, the state manager will attempt to invoke the event
on all parent states until the root state is reached. The state
Expand Down
2 changes: 1 addition & 1 deletion addon/-record-data-private/system/references/belongs-to.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { deprecate } from '@ember/debug';
import { assertPolymorphicType } from 'ember-data/-debug';

/**
A BelongsToReference is a low level API that allows users and
A BelongsToReference is a low-level API that allows users and
addon author to perform meta-operations on a belongs-to
relationship.
Expand Down
6 changes: 3 additions & 3 deletions addon/-record-data-private/system/references/has-many.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { DEBUG } from '@glimmer/env';
import { assertPolymorphicType } from 'ember-data/-debug';

/**
A HasManyReference is a low level API that allows users and addon
A HasManyReference is a low-level API that allows users and addon
author to perform meta-operations on a has-many relationship.
@class HasManyReference
Expand Down Expand Up @@ -64,7 +64,7 @@ export default class HasManyReference extends Reference {
```
@method remoteType
@return {String} The name of the remote type. This should either be "link" or "ids"
@return {String} The name of the remote type. This should either be `link` or `ids`
*/
remoteType() {
let value = this._resource();
Expand All @@ -76,7 +76,7 @@ export default class HasManyReference extends Reference {
}

/**
`ids()` returns an array of the record ids in this relationship.
`ids()` returns an array of the record IDs in this relationship.
Example
Expand Down
2 changes: 1 addition & 1 deletion addon/-record-data-private/system/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const {
[createRecord](#method_createRecord) is used for creating new
records on the client side. This will return a new record in the
`created.uncommitted` state. In order to persist this record to the
backend you will need to call `record.save()`.
backend, you will need to call `record.save()`.
[push](#method_push) is used to notify Ember Data's store of new or
updated records that exist in the backend. This will return a record
Expand Down
14 changes: 7 additions & 7 deletions addon/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import EmberObject from '@ember/object';
/**
An adapter is an object that receives requests from a store and
translates them into the appropriate action to take against your
persistence layer. The persistence layer is usually an HTTP API, but
persistence layer. The persistence layer is usually an HTTP API but
may be anything, such as the browser's local storage. Typically the
adapter is not invoked directly instead its functionality is accessed
through the `store`.
Expand Down Expand Up @@ -52,7 +52,7 @@ import EmberObject from '@ember/object';
* `findMany()`
For an example implementation, see `DS.RESTAdapter`, the
For an example of the implementation, see `DS.RESTAdapter`, the
included REST adapter.
@class Adapter
Expand Down Expand Up @@ -90,7 +90,7 @@ export default EmberObject.extend({
method should return a promise that will resolve to a JavaScript object that will be
normalized by the serializer.
Here is an example `findRecord` implementation:
Here is an example of the `findRecord` implementation:
```app/adapters/application.js
import DS from 'ember-data';
Expand Down Expand Up @@ -477,7 +477,7 @@ export default EmberObject.extend({
Organize records into groups, each of which is to be passed to separate
calls to `findMany`.
For example, if your api has nested URLs that depend on the parent, you will
For example, if your API has nested URLs that depend on the parent, you will
want to group records by their parent.
The default implementation returns the records as a single group.
Expand Down Expand Up @@ -578,9 +578,9 @@ export default EmberObject.extend({
case a cached version is more than 20 minutes old, `findAll` will not
resolve until you fetched the latest versions.
By default this methods returns `true` if the passed `snapshotRecordArray`
By default, this method returns `true` if the passed `snapshotRecordArray`
is empty (meaning that there are no records locally available yet),
otherwise it returns `false`.
otherwise, it returns `false`.
Note that, with default settings, `shouldBackgroundReloadAll` will always
re-fetch all the records in the background even if `shouldReloadAll` returns
Expand Down Expand Up @@ -624,7 +624,7 @@ export default EmberObject.extend({
}
```
By default this hook returns `true` so the data for the record is updated
By default, this hook returns `true` so the data for the record is updated
in the background.
@since 1.13.0
Expand Down
2 changes: 1 addition & 1 deletion addon/adapters/json-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { pluralize } from 'ember-inflector';
## JSON API Conventions
The JSONAPIAdapter uses JSON API conventions for building the url
The JSONAPIAdapter uses JSON API conventions for building the URL
for a record and selecting the HTTP verb to use with a request. The
actions you can take on a record map onto the following URLs in the
JSON API adapter:
Expand Down
6 changes: 3 additions & 3 deletions addon/adapters/rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ const Promise = EmberPromise;
```
If the records in the relationship are not known when the response
is serialized its also possible to represent the relationship as a
url using the `links` key in the response. Ember Data will fetch
this url to resolve the relationship when it is accessed for the
is serialized it's also possible to represent the relationship as a
URL using the `links` key in the response. Ember Data will fetch
this URL to resolve the relationship when it is accessed for the
first time.
```js
Expand Down
Loading

0 comments on commit cca9219

Please sign in to comment.