I have this in my Inflector file: ActiveSupport::Inflector.inflections do |inflect| inflect.irregular ''progress'', ''progresses'' end but when I run:>> "progress".classifyi get => Progres Obviously this is messing up some internals. Progress doesn''t really count as "uncountable" Any help is appreciated -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Sep 25, 11:02 am, Timothy Johnson <rails-mailing-l...@andreas- s.net> wrote:> 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 > -- > Posted viahttp://www.ruby-forum.com/.Any chance you can use "progression" or "step" instead of "progress"? Might be easier for the inflector to figure things out...? Jeff --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Sure, there are other options out there to describe it. Would this be a consideration that the inflector is broken though? Jeff Cohen wrote:> Any chance you can use "progression" or "step" instead of "progress"? > Might be easier for the inflector to figure things out...? > > Jeff-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. On Thu, Sep 25, 2008 at 11:15 AM, Timothy Johnson < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Sure, there are other options out there to describe it. Would this be a > consideration that the inflector is broken though? > > > > > > Jeff Cohen wrote: > > Any chance you can use "progression" or "step" instead of "progress"? > > Might be easier for the inflector to figure things out...? > > > > Jeff > > -- > Posted via http://www.ruby-forum.com/. > > > >-- ANDRES RODRIGUEZ E Electronic Engineer Software Developer IT Consultant US Phone: (305) 853-8356 Primary Mobile: +57-300-2006186 Secondary Mobile: +57-314-7939859 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---