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
Subdirectories are not supported #540
Comments
It looks like they aren't supported by default - have you seen any other addons use this? Also, have you tried creating the file manually? It may just be the generator that doesn't work. I haven't thought about pods and Mirage. I use pods in my Ember apps and Mirage's default structure suits me. Any particular problem you're facing? |
@samselikoff the generator works fine and doesn't throw any errors. That assertion gets thrown by the ember-cli-mirage initializer when its reading in the modules on application boot up in the browser. https://github.com/samselikoff/ember-cli-mirage/blob/master/addon/utils/read-modules.js#L32 Thats the function and assertion that gets called by the initializer. I'm trying to port over an old pretender based fixture system to ember-mirage and it was going greate till I hit a nested resource. |
@samselikoff I was just thinking Pods because if you have nested resources in your app, then it would be awesome if Mirage reflected that structure as well. I guess a potential issue would be if you have two models with the same name under different namespaces. |
I see. We should definitely support nested resources. I'm focused on other 0.2.0 issues at the moment, so if anyone else wants to spearhead this, I would start by making an app with nested resources, and taking a look at options.models in the Server constructor, as well as what ends up in |
Filing under the "Subdirectory support" card on the Roadmap project. |
When running:
ember g mirage-model foo/bar
The following error occurs when trying to access the route:
Assertion Failed: Subdirectories under foo are not supported
A related question:
How would you see Pods structure working with ember-cli-mirage?
Thanks!
The text was updated successfully, but these errors were encountered: