"criteria" pluralized should be "criteria"
fivetanley opened this issue · 3 comments
From my terminal:
➜ lol bundle exec rails c
Running via Spring preloader in process 52353
Loading development environment (Rails 4.2.5.1)
irb(main):001:0> 'criteria'.pluralize
=> "criteria"
Current Ember Inflector pluralizes to criterium
.
Ran into this one today. Current version 1.9.4 correctly pluralizes to criteria
.
Though it should singularize to criterion
.
Depends on if the goal is correctness or matching behavior in ActiveSupport::Inflector
for compatibility with Rails.
An issue was opened a while back regarding this in rails/rails#11876.
Happy to submit a PR if we want to change this.
a PR would be great. We defer to Rails's ActiveSupport::Inflector for all inflection rules, so "criteria" is what it should be here. If Rails changes it we will also change it.
If matching Rails, I think we're in good shape:
Ember.Inflector.inflector.pluralize('criterita');
"criterita"
Ember.Inflector.inflector.pluralize('criterium');
"criteria"
Ember.Inflector.inflector.singularize('criteria');
"criterium"
Ember.Inflector.inflector.singularize('criterium');
"criterium"
irb(main):007:0> "criteria".pluralize
=> "criteria"
irb(main):008:0> "criterium".pluralize
=> "criteria"
irb(main):009:0> "criteria".singularize
=> "criterium"
irb(main):010:0> "criterium".singularize
=> "criterium"
I'll continue to override. I believe this issue can be closed.
Thanks!