Thomas Mango
2007-Jan-12 21:26 UTC
pluralization for ''EventSeries'' turns into table name ''event_sery''
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. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Rimantas Liubertas
2007-Jan-12 23:44 UTC
Re: pluralization for ''EventSeries'' turns into table name ''event_sery''
> 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/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thomas Mango
2007-Jan-13 21:10 UTC
pluralization for ''EventSeries'' turns into table name ''event_sery''
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. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Rick Olson
2007-Jan-14 19:46 UTC
Re: pluralization for ''EventSeries'' turns into table name ''event_sery''
On 1/13/07, Thomas Mango <tsmango-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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.Make that word uncountable in your environment.rb. I used to have a model named Series, and for a time it worked okay. Then, I tried to add resource routes and all hell broke loose. -- Rick Olson http://weblog.techno-weenie.net http://mephistoblog.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 -~----------~----~----~----~------~----~------~--~---
Thomas Mango
2007-Jan-15 00:18 UTC
Re: pluralization for ''EventSeries'' turns into table name ''event_sery''
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. On Jan 12, 6:44 pm, "Rimantas Liubertas" <riman...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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/--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Mark Van Holstyn
2007-Jan-15 00:46 UTC
Re: pluralization for ''EventSeries'' turns into table name ''event_sery''
The ''ies'' ending fix was is here: http://dev.rubyonrails.org/changeset/4868 Mark On 1/14/07, Thomas Mango <tsmango-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > 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. > > > On Jan 12, 6:44 pm, "Rimantas Liubertas" <riman...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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/ > > > > >-- Mark Van Holstyn mvanholstyn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://lotswholetime.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 -~----------~----~----~----~------~----~------~--~---
Thomas Mango
2007-Jan-15 02:01 UTC
Re: pluralization for ''EventSeries'' turns into table name ''event_sery''
That worked great. Thank you very much for your time, I really appreciate it. On Jan 14, 7:46 pm, "Mark Van Holstyn" <mvett...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> The ''ies'' ending fix was is here:http://dev.rubyonrails.org/changeset/4868 > > Mark > > On 1/14/07, Thomas Mango <tsma...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > 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. > > > On Jan 12, 6:44 pm, "Rimantas Liubertas" <riman...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > 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/-- > Mark Van Holstyn > mvanhols...-Re5JQEeQqe80Tx58lXaADg@public.gmane.org://lotswholetime.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 -~----------~----~----~----~------~----~------~--~---