Pluralization for 'EventSeries' turns into table name 'event

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.
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.

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.
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/

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.

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

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

Mark

On 1/14/07, Thomas M. [email protected] wrote:

console:
On Jan 12, 6:44 pm, “Rimantas L.” [email protected] wrote:

b) Find Inflector.inflections do |inflect|
Loading development environment.>> ‘series’.pluralize
=> “series”

‘EventSeries’.tableize=> “event_series”

Regards,
Rimantas
http://rimantas.com/


Mark Van H.
[email protected]
http://lotswholetime.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs