# Pluralization for 'EventSeries' turns into table name 'event

**URL:** <https://www.ruby-forum.com/t/pluralization-for-eventseries-turns-into-table-name-event/82424>\
**Category:** Rails\
**Created:** [January 19, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/pluralization-for-eventseries-turns-into-table-name-event/82424 "2007-01-19T16:30:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomasmaas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/5e9695/32.png) [@thomasmaas](https://www.ruby-forum.com/u/thomasmaas)\
**Post date:** [January 19, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/pluralization-for-eventseries-turns-into-table-name-event/82424/1 "2007-01-19T16:30:20Z")

</div>

hello everyone,

while generating the model EventSeries, my migration was generated with  
the database table name ‘event\_sery’. i double checked the  
pluralization tool located at: [http://nubyonrails.com/tools/pluralize](http://nubyonrails.com/tools/pluralize).  
I was wondering if anyone has ever come across an issue similar to this  
one. should i just override the table my model is associated with and  
change the generated table name to ‘event\_series’?

thank you, for your input.

---

<div class="post-metadata">

**Author:** ![thomasmaas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/5e9695/32.png) [@thomasmaas](https://www.ruby-forum.com/u/thomasmaas)\
**Post date:** [January 19, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/pluralization-for-eventseries-turns-into-table-name-event/82424/2 "2007-01-19T16:30:50Z")

</div>

> while generating the model EventSeries, my migration was generated with  
> the database table name ‘event\_sery’. i double checked the  
> pluralization tool located at: [http://nubyonrails.com/tools/pluralize](http://nubyonrails.com/tools/pluralize).  
> I was wondering if anyone has ever come across an issue similar to this  
> one. should i just override the table my model is associated with and  
> change the generated table name to ‘event\_series’?
> 
> thank you, for your input.

a) go to config/environment.rb  
b) Find Inflector.inflections do |inflect|  
c) make it look like this:

Inflector.inflections do |inflect|  
inflect.uncountable %w( series series )  
end

d) regenerate model

It should be ok now:

Loading development environment.

> > ‘series’.pluralize  
> > =\> “series”  
> > ‘EventSeries’.tableize  
> > =\> “event\_series”

## Regards, Rimantas

[http://rimantas.com/](http://rimantas.com/)

---

<div class="post-metadata">

**Author:** ![thomasmaas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/5e9695/32.png) [@thomasmaas](https://www.ruby-forum.com/u/thomasmaas)\
**Post date:** [September 25, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/pluralization-for-eventseries-turns-into-table-name-event/82424/3 "2007-09-25T22:43:42Z")

</div>

Thank you very much for your response. I updated my environment.rb, but  
take a look what happens now:

environment.rb changes:  
Inflector.inflections do |inflect|  
inflect.uncountable %w( series series )  
end

console:  
Loading development environment.

> > ‘series’.tableize  
> > =\> “series”
> 
> > ‘EventSeries’.tableize  
> > =\> “event\_sery”

Very strange. Any ideas what may be causing this? Thank you, in  
advance.

---

<div class="post-metadata">

**Author:** ![thomasmaas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/5e9695/32.png) [@thomasmaas](https://www.ruby-forum.com/u/thomasmaas)\
**Post date:** [September 25, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/pluralization-for-eventseries-turns-into-table-name-event/82424/4 "2007-09-25T23:11:18Z")

</div>

That worked great. Thank you very much for your time, I really  
appreciate it.

---

<div class="post-metadata">

**Author:** ![thomasmaas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/5e9695/32.png) [@thomasmaas](https://www.ruby-forum.com/u/thomasmaas)\
**Post date:** [September 25, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/pluralization-for-eventseries-turns-into-table-name-event/82424/5 "2007-09-25T23:11:14Z")

</div>

The ‘ies’ ending fix was is here:  
[http://dev.rubyonrails.org/changeset/4868](http://dev.rubyonrails.org/changeset/4868)

Mark

On 1/14/07, Thomas M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> console:  
> On Jan 12, 6:44 pm, “Rimantas L.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > b) Find Inflector.inflections do |inflect|  
> > Loading development environment.\>\> ‘series’.pluralize  
> > =\> “series”
> > 
> > > > ‘EventSeries’.tableize=\> “event\_series”
> > 
> > Regards,  
> > Rimantas  
> > –[http://rimantas.com/](http://rimantas.com/)
> 
> >

–  
Mark Van H.  
removed\_email\_address@domain.invalid  
[http://lotswholetime.com](http://lotswholetime.com)
