Skip to content
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

Partial resolution is ambiguous #22

Closed
machty opened this issue Jan 31, 2014 · 5 comments · Fixed by #23
Closed

Partial resolution is ambiguous #22

machty opened this issue Jan 31, 2014 · 5 comments · Fixed by #23

Comments

@machty
Copy link

machty commented Jan 31, 2014

We either need loud breaking errors, better docs, or both, but I tried putting a template in as templates/_foo-bar.handlebars, adhering to dasherizedness but thinking that underscores are so ingrained that the underscore rule would win for the first char; doesn't seem like I'm the only dudette or dude tripped up by this.

@stefanpenner
Copy link
Contributor

errors/warning seems key.

the docs are (or should be) "dasherize" everything

@rwjblue
Copy link
Member

rwjblue commented Jan 31, 2014

You do not need to prefix the template with an underscore for partials (which I'm sure you already knew). I believe that the non-underscored version is looked up first, and the underscored name is only a fallback if that isn't found.

I think a deprecation warning in Ember itself when using underscored partials would also be useful to get folks ready.

I will look into adding a warning of some sort, in both projects.

@rwjblue
Copy link
Member

rwjblue commented Jan 31, 2014

Just to clarify, I meant when using underscore prefixed partials.

@rwjblue
Copy link
Member

rwjblue commented Feb 1, 2014

My prior comment was incorrect. Both underscored and non-underscored names are looked up, but the underscored version is the default. Basically, I had which one was deprecated backwards. Sorry about that.

For future reference here is the code handling the templateName.

@rwjblue
Copy link
Member

rwjblue commented Feb 1, 2014

PR proposing a fix: #23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants