Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Remove reference to isDirty in DS.Model documentation #3827

Merged
merged 1 commit into from
Oct 7, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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