-
-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Description
I tried adding
inflector.irregular('unitOfMeasure', 'unitsOfMeasure');
To my app and it doesn't work, it hits /api/unitOfMeasure, it should now be hitting /api/unitsOfMeasure
I created a unit test in /tests/unit/inflector-test.js that fails on both asserts in latest master:
test('unit of measure', function(assert) {
inflector.irregular('unitOfMeasure', 'unitsOfMeasure');
assert.equal(inflector.singularize('unitsOfMeasure'), 'unitOfMeasure', 'irregular singularization rule was applied');
assert.equal(inflector.pluralize('unitOfMeasure'), 'unitsOfMeasure', 'irregular pluralization rule was applied');
});
I had a quick debug, it seems to find the irregular rule ok and populate substitution in the for loop, but then I think the return in that loop of return word.replace(rule, substitution); doesn't do the job as word is unitOfMeasure and rule is unitofmeasure, so there is no match due to the casing?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels