On Tuesday, December 12, 2017 at 9:26:00 AM UTC-8, Martin Stein wrote: > > Hi, > > I am a newbie having an issue where Sequel is ignoring my custom > inflections > > example: > > Sequel.inflections do |inflect| > inflect.uncountable 'multimedia' > end > > when I list the uncountables, I see that 'multimedia' has been added: > > Sequel.inflections.uncountables > > => ["equipment", "information", "rice", "money", "species", "series", > "fish", "sheep", "news", "multimedia"] > > however: > > 'multimedia'.pluralize > => "multimedias" > > while > > 'information'.pluralize > => "information" > > Anybody have an idea what I might be doing wrong? >
Sequel doesn't add inflection methods to String by default. It does offer an inflector extension that does, but you use String.inflections and not Sequel.inflections if you are using that. Sequel.inflections only affects inflections used internally by Sequel::Model, and only if the inflection methods are not defined on String. So you should probably be using String.inflections if you are using Sequel's inflector extension, or you should use the API for the other string inflection library you are loading if you are loading one. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
