Skip to content

Commit

Permalink
Merge pull request #3827 from pangratz/doc-remove-reference-to-model-…
Browse files Browse the repository at this point in the history
…is-dirty

[DOC] Remove reference to `isDirty` in DS.Model documentation
  • Loading branch information
bmac committed Oct 7, 2015
2 parents 63bad85 + eac3ff0 commit 083b406
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions packages/ember-data/lib/system/model/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ var Model = Ember.Object.extend(Ember.Evented, {
/**
If this property is `true` the record is in the `deleted` state
and has been marked for deletion. When `isDeleted` is true and
`isDirty` is true, the record is deleted locally but the deletion
`hasDirtyAttributes` is true, the record is deleted locally but the deletion
was not yet persisted. When `isSaving` is true, the change is
in-flight. When both `isDirty` and `isSaving` are false, the
in-flight. When both `hasDirtyAttributes` and `isSaving` are false, the
change has persisted.
Example
Expand All @@ -158,9 +158,9 @@ var Model = Ember.Object.extend(Ember.Evented, {
record.deleteRecord();
// Locally deleted
record.get('isDeleted'); // true
record.get('isDirty'); // true
record.get('isSaving'); // false
record.get('isDeleted'); // true
record.get('hasDirtyAttributes'); // true
record.get('isSaving'); // false
// Persisting the deletion
var promise = record.save();
Expand All @@ -169,9 +169,9 @@ var Model = Ember.Object.extend(Ember.Evented, {
// Deletion Persisted
promise.then(function() {
record.get('isDeleted'); // true
record.get('isSaving'); // false
record.get('isDirty'); // false
record.get('isDeleted'); // true
record.get('isSaving'); // false
record.get('hasDirtyAttributes'); // false
});
```
Expand Down Expand Up @@ -645,7 +645,7 @@ var Model = Ember.Object.extend(Ember.Evented, {
*/

/**
If the model `isDirty` this function will discard any unsaved
If the model `hasDirtyAttributes` this function will discard any unsaved
changes. If the model `isNew` it will be removed from the store.
Example
Expand Down Expand Up @@ -704,9 +704,7 @@ var Model = Ember.Object.extend(Ember.Evented, {
/**
Reload the record from the adapter.
This will only work if the record has already finished loading
and has not yet been modified (`isLoaded` but not `isDirty`,
or `isSaving`).
This will only work if the record has already finished loading.
Example
Expand Down

0 comments on commit 083b406

Please sign in to comment.