Skip to content

Instantly share code, notes, and snippets.

@olivia
Forked from corrspt/application.controller.js
Last active October 22, 2015 16:19
Show Gist options
  • Save olivia/e369afd7ee6ecea87908 to your computer and use it in GitHub Desktop.
Save olivia/e369afd7ee6ecea87908 to your computer and use it in GitHub Desktop.
EmberInflector Bug
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
plural: Ember.computed(function() {
return Ember.Inflector.inflector.pluralize("gas");
}),
singular: Ember.computed(function() {
return Ember.Inflector.inflector.singularize("gases");
}),
});
import Ember from 'ember';
Ember.Inflector.inflector.irregular('gas', 'gases');
export default Ember.Route.extend({
model: function(){
this.store.query('gas', {});
}
});
<h1>Ember-Inflector Bug</h1>
<br>
<br>
<h2> Pluralizing Gas </h2>
{{plural}}
<br>
<h2> Singularizing Gases </h2>
{{singular}}
import DS from 'ember-data';
export default DS.Model.extend({
});
{
"version": "0.4.13",
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.1.0/ember.debug.js",
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/2.1.0/ember-data.js",
"ember-template-compiler": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.1.0/ember-template-compiler.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment