Skip to content

Instantly share code, notes, and snippets.

@corrspt
Created October 22, 2015 07:57
Show Gist options
  • Save corrspt/693a61eed139ab8f8d56 to your computer and use it in GitHub Desktop.
Save corrspt/693a61eed139ab8f8d56 to your computer and use it in GitHub Desktop.
EmberInflector
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");
}),
});
<h1>Ember-Inflector Bug</h1>
<br>
<br>
<h2> Pluralizing Gas </h2>
{{plural}}
<br>
<h2> Singularizing Gases </h2>
{{singular}}
{
"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