I know how to use 'db' to work with internal mirage database in tests but I did not found out if it is possible to access internals like 'db' in standard routes. I understand that my app has no knowledge that mirage is used so it might not be possible.
Asked
Active
Viewed 41 times
1 Answers
1
Mirage's db
is passed into route handlers as the first parameter, so you can access it there.
If you're talking about accessing it within your Ember app's routes (e.g. Ember.Route.extend
), this is not really appropriate because Mirage is just a mock for your API and, as you say, your Ember app should have no knowledge of its data other than via XHR requests.

Sam Selikoff
- 12,366
- 13
- 58
- 104
-
Thanks, I was talking about Ember.Route.extend – Marek Grác Apr 10 '16 at 05:23