1
votes

I have used ember inflector

Ember.Inflector.inflector.rules.uncountable['quiz'] = true;
var inflector = Ember.Inflector.inflector;
inflector.irregular('quiz', 'quizes');

QuizAPP.Store = DS.Store.extend({
    revision: 11,
    adapter: DS.RESTAdapter.create()
});

QuizAPP.QuizShowRoute = Ember.Route.extend({
    model: function(){
        console.log("Route of quiz show")
        return this.get('store').find('quiz');
    }
});

Expected Outcome in console:

GET http://localhost:3000/quizes 

But, Error in console:

GET http://localhost:3000/quizs 404 (Not Found)

Is this correct way of using ember inflector?

1
Possible duplicate of Ember Cli Inflector adjustmentsMT0

1 Answers

2
votes

Remove the first line Ember.Inflector.inflector.rules.uncountable['quiz'] = true; and it should work. You should not set both an irregular and uncountable rule.