-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Support camelcase resolving of controllers in needs
array
#20
Conversation
I am unsure of this. I believe that you should be using
|
But this does not help someone following the documentation and using EAK and find it not working. Don't you think? |
EAK's naming conventions are a strict subset of embers, to prevent ambiguity. If anything we should assert if the usage is malformed. ember 2.0 will be following these conventions, EAK is pushing everything forward. |
@rahulcs - I agree that it is confusing, but the documentation does not specifically state that it needs to be camelized, and there are likely many examples in the documentation that will need to be fixed before we go live with this as the default resolver in Ember (likely 2.0). |
@stefanpenner - So assert if |
Yeah at least an assert would be good if not a documentation change right away. |
assert with a link to the new conventions |
i thin kthose are up todate |
@stefanpenner - OK, will work that up (with some tests). |
The build is failing. Will send it again in some time. |
can you add a test? |
@stefanpenner will add tests and commit. |
@@ -117,6 +117,19 @@ test("will raise error if both dasherized and underscored modules exist", functi | |||
} | |||
}); | |||
|
|||
test("will raise error if camelcased modules exist", function() { | |||
expect(2); |
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.
You will only hit one since the other would require that you NOT hit an error.
Support camelcase resolving of controllers in `needs` array
Hi, |
@dogawaf - Can you give a bit more information on this in a new issue? It would be helpful to have examples of your on-disk filenames (just the ones causing an issue), as well as how you are referencing them (if not by auto-lookup). It is quite possible that we need to tweak our assertions, but I'll need examples to add more test coverage. |
My models directory:
In my case, the lookup which fails the assert is done automatically by ember-data ActiveModelSerializer, which call |
Use Array polyfill if needed.
if a
needs
array contains a camel case name for a nested controller http://emberjs.com/api/classes/Ember.ControllerMixin.html#property_needsThis program fails on ember-app-kit because the resolver cannot find controller:postComment since it is not handled, which means discrepancy from the ember js syntax for
needs
.http://emberjs.jsbin.com/iKAyIjIf/10/edit