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

owner.inject with model type is broken in beta #14941

Closed
workmanw opened this issue Feb 20, 2017 · 4 comments
Closed

owner.inject with model type is broken in beta #14941

workmanw opened this issue Feb 20, 2017 · 4 comments

Comments

@workmanw
Copy link

workmanw commented Feb 20, 2017

Ember-Release: Working Twiddle
Ember-Beta: Broken Twiddle

It seems that using owner.inject targeting a model type in an initializer is broken on beta. Example:

// app/initializers/i18n.js
export default {
  name: 'i18n',
  after: 'ember-i18n',
  initialize: function(app) {
    app.inject('model', 'i18n', 'service:i18n')
  }
};

I have not had the chance to fulling investigate it yet. But it seems that these types of injections do work on other types (controller, component, etc).

@workmanw
Copy link
Author

So using the component/emberjs builds to bisect and it seems to have broken with this build: components/ember@c73cce4 which is unfortunately not super helpful because that was the beginning of the beta cycle.

I'll see if I can keep digging. Just looking at the diff it's hard to not see the factory-for feature and be suspicious about that.

@rwjblue
Copy link
Member

rwjblue commented Feb 20, 2017

I'm certain it is related to ember-factory-for feature, but I'm not exactly sure why yet.

@workmanw
Copy link
Author

@rwjblue I have some cycles at the moment. If you have any hunches, I'd be happy to investigate further. I could also try to write a failing test.

@workmanw
Copy link
Author

Talked with @rwjblue on slack. We agreed this was an ember-data issue and the issue should be moved over there. See: emberjs/data#4807

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

No branches or pull requests

2 participants