Skip to content
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.

Fix legacy each with item controller #11

Merged
merged 3 commits into from May 12, 2020
Merged

Fix legacy each with item controller #11

merged 3 commits into from May 12, 2020

Conversation

mmun
Copy link
Member

@mmun mmun commented May 11, 2020

This part of the original code in the ember.js repo didn't make it into this addon originally:

https://github.com/emberjs/ember.js/blob/v1.13.13/packages/ember-views/lib/views/legacy_each_view.js#L40-L46

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add a treeFor (or treeForApp) that avoids putting the app/controllers/* files into the host app if it isn't opting in to legacy controllers.

I'm thinking something like (and you can remove the similar guard from treeForVendor):

treeFor() {
  if (this.hasLegacyViewSupport) {
    return this._super.treeFor.apply(this, arguments);
  }
},

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh! That was completely wrong, sorry for the run around @mmun.

@rwjblue rwjblue merged commit 0c570b1 into master May 12, 2020
@rwjblue rwjblue deleted the moar-fixes branch May 12, 2020 01:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants