-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
models/crate: Load
crate.versions
explicitly with a task
A debugging assert is also included to inform missing `perform()` called before accessing getters. This fix the following deprecations: - The toArray method on ember-data's PromiseManyArray is deprecated. - The `toArray` method on the class ManyArray is deprecated.
- Loading branch information
Showing
4 changed files
with
32 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import Route from '@ember/routing/route'; | ||
import { waitForPromise } from '@ember/test-waiters'; | ||
|
||
export default class VersionsRoute extends Route { | ||
setupController(controller) { | ||
super.setupController(...arguments); | ||
let crate = this.modelFor('crate'); | ||
controller.set('crate', crate); | ||
// TODO: Add error handling | ||
waitForPromise(crate.loadVersionsTask.perform()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters