1

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?

Marcio Junior
  • 19,078
  • 4
  • 44
  • 47
Shrikanth
  • 301
  • 4
  • 13
  • Possible duplicate of [Ember Cli Inflector adjustments](http://stackoverflow.com/questions/24593483/ember-cli-inflector-adjustments) – MT0 May 16 '16 at 13:42

1 Answers1

2

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.

Roy Daniels
  • 6,309
  • 2
  • 27
  • 29