Not able to define irregular, uncountable when imported directly
jrjohnson opened this issue · 2 comments
jrjohnson commented
I'm trying to replace my custom rules via direct import instead of through Ember
. I have an initializer with
import Ember from 'ember';
export function initialize() {
var inflector = Ember.Inflector.inflector;
inflector.irregular('vocabulary', 'vocabularies');
inflector.uncountable('aamc-pcrs');
}
export default {
name: 'inflector',
initialize
};
Attempting to update to using the module directly I tried to do
import { irregular, uncountable } from 'ember-inflector';
export function initialize() {
irregular('vocabulary', 'vocabularies');
uncountable('aamc-pcrs');
}
export default {
name: 'inflector',
initialize
};
But it results in TypeError: _emberInflector.irregular
. Wondering if I'm just completely off base with my setup, or just missing something obvious? If someone can put me on the right path I will be happy to update the README with this information as I assume I'm not the only one defining strange words.
btecu commented
Try
import Inflector from 'ember-inflector';
Inflector.inflector.uncountable('aamc-pcrs');