11175
(-- --)
1
I have this in my Inflector file:
ActiveSupport::Inflector.inflections do |inflect|
inflect.irregular 'progress', 'progresses'
end
but when I run:
"progress".classify
i get
=> Progres
Obviously this is messing up some internals. Progress doesn't really
count as "uncountable"
Any help is appreciated
Jeff1
(Jeff)
2
Any chance you can use "progression" or "step" instead of "progress"?
Might be easier for the inflector to figure things out...?
Jeff
11175
(-- --)
3
Sure, there are other options out there to describe it. Would this be a
consideration that the inflector is broken though?
Jeff Cohen wrote:
Hi Timothy, your code is right. Here’s the thing:
Inflector.classify is used to see how rails converts to table_name to Model name. So you have to do this:
Inflector.classify “progresses”
Inflector.pluralize gives you the contrary.
If you want more information take a look at this:
http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#M000248
There you can see that actually your “progres” bug thing is documented right there but with “busines”.
Hope it helps.