-
-
Notifications
You must be signed in to change notification settings - Fork 113
Priority for already loaded record #329
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
Conversation
app/services/filter-data.js
Outdated
@@ -1,7 +1,7 @@ | |||
import Service from '@ember/service'; | |||
|
|||
export default Service.extend({ | |||
showInherited: false, | |||
showInherited: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we wouldn't want to change this behaviour for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sivakumar-kailasam if I set it to false
, 4 tests fail and this is magic for me..
https://github.com/ember-learn/ember-api-docs/blob/master/tests/acceptance/class-test.js#L41
https://travis-ci.org/ember-learn/ember-api-docs/builds/267572653#L846
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sivakumar-kailasam done
@@ -64,7 +69,7 @@ export default Route.extend(ScrollTracker, { | |||
|
|||
serialize(model) { | |||
return { | |||
class: model.get('name') | |||
class: get(model, 'name') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Turbo87 class
route alteady has import { set, get } from '@ember/object';
, why not to use them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because they are much harder to read IMHO and only make sense if model
was a POJO and not an Ember.Object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rolled-back
I might be off base here, but doesn't ember-data implicitly do caching? findRecord should load existing items in the store if already loaded. |
@toddjordan looks like it's depends on adapter configuration - https://github.com/emberjs/data/blob/master/addon/-legacy-private/system/store.js#L520 |
Verified, additional calls to that json are loaded from disk cache, reducing the need for this update. |
if we already have loaded recored - do not reload it from server