-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
willDestroy missed in documentation? #2914
Comments
The willDestroy comes form Ember.Object which the store extends (http://emberjs.com/api/classes/Ember.Object.html#method_willDestroy). It looks like when the Ember Data API doc are built they aren't pulling in classes from Ember itself. I wonder if it would be possible for the API docs to know about Ember classes they depend on without those classes showing up in the Ember Data sidebar. |
@svox1 Could you explain more about your use-case? |
I dont want to manually remove every model for himself (I have to clean all) and dont want to reload the whole application with location.reload(); or something like this. ... its a Cordova Application. forEach(types, this.unloadAll, this); I have create a pull request: Or are there better alternatives with public methods? |
Thanks for the PR! I'm afraid messing with Perhaps a better way would be to provide a public API for unloading all records of all types. We currently have methods for unloading a single record as well as all records for a specific type. I think a method to unload all records of all types would make more sense. @bmac @fivetanley @igorT thoughts? |
@wecc I just proposed the exact same solution in the other thread :) |
I have create a pull request for this. |
Hi,
I use store.willDestroy() to clean my models after the user is logged out. This works already fine.
I find this method after reading:
https://github.com/emberjs/data/blob/1.0.0-beta.15/packages/ember-data/lib/system/store.js#L1766
If this method is for public use, I was surprised that this method isnt in the documentation:
http://emberjs.com/api/data/classes/DS.Store.html
Or is this method not for public use?
Regards and thanks all Ember contributors!
The text was updated successfully, but these errors were encountered: