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

Inflector rules in initializers no longer apply #3730

Closed
jrjohnson opened this issue Sep 7, 2015 · 2 comments
Closed

Inflector rules in initializers no longer apply #3730

jrjohnson opened this issue Sep 7, 2015 · 2 comments

Comments

@jrjohnson
Copy link
Contributor

This has been working but is now failing with ember-data 1.13.11,. I'm not sure exactly when it started to fail, I'm going to try building a bunch of versions to see if I can pin it down. Unless this is known, or I'm doing it wrong, then I won't spend the time.

app/initializers/inflector.js

import Ember from 'ember';

export function initialize(/* container, application */) {
  Ember.Inflector.inflector.uncountable('aamc-pcrs');
}

export default {
  name: 'inflector',
  initialize: initialize
};

I get Error: No model was found for 'aamc-pcr'

However it works fine if I move it into
app/app.js

Ember.Inflector.inflector.uncountable('aamc-pcrs');

The user of an initializer for this seems to be the generally accepted advice, but there is no clear recommendation in the guides so maybe I've been doing it wrong? Or maybe something in the initializer chain is different.

@fivetanley
Copy link
Member

Hey @jrjohnson, sorry for the late reply. I think this should be fixed as of 1.13.16. Please let me know if it does not. For more info, here's the PR: #4143

@jrjohnson
Copy link
Contributor Author

We are on 2.3.x now and were able to move this back into an initializer so I can't confirm. I think this can be safely closed though.

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