Skip to content

Partial resolution is ambiguous #22

Closed
@machty

Description

@machty

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.

Activity

stefanpenner

stefanpenner commented on Jan 31, 2014

@stefanpenner
Contributor

errors/warning seems key.

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

rwjblue

rwjblue commented on Jan 31, 2014

@rwjblue
Member

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

rwjblue commented on Jan 31, 2014

@rwjblue
Member

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

rwjblue

rwjblue commented on Feb 1, 2014

@rwjblue
Member

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

rwjblue commented on Feb 1, 2014

@rwjblue
Member

PR proposing a fix: #23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Partial resolution is ambiguous · Issue #22 · ember-cli/ember-resolver