Created a new model ''klasse'' using scaffold, which was pluralised to ''klasses'', which I don''t want! Removed all concerning ''klasse'' and ''klasses'' in the model. Added inflection "inflect.irregular ''klasse'', ''klassen''" to inflections.rb. Recreated model again using scaffold. URL: http://localhost:3000/klassen fails with the following: Mysql::Error: #42S02Table ''schule_development.klasses'' doesn''t exist: SELECT * FROM `klasses` Seems rails is still hanging onto ''klasses'' somewhere, but where? Any ideas anyone? JamesR --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ganesh Gunasegaran
2008-Jul-25 11:00 UTC
Re: Problems with pluralization...and active record.find
Seems like you still have the older migration (klasses) applied to your database. Reapply the migration rake db:migrate VERSION=0 rake db:migrate Cheers, Ganesh Gunasegaran. SageWork - Simplify IT(http://www.sagework.com) On Fri, 2008-07-25 at 01:00 -0700, JamesR wrote:> Created a new model ''klasse'' using scaffold, which was pluralised to > ''klasses'', which I don''t want! > Removed all concerning ''klasse'' and ''klasses'' in the model. > Added inflection "inflect.irregular ''klasse'', ''klassen''" to > inflections.rb. > Recreated model again using scaffold. > > URL: http://localhost:3000/klassen fails with the following: > > Mysql::Error: #42S02Table ''schule_development.klasses'' doesn''t exist: > SELECT * FROM `klasses` > > Seems rails is still hanging onto ''klasses'' somewhere, but where? > > Any ideas anyone? > > JamesR > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ganesh Gunasegaran
2008-Jul-25 11:38 UTC
Re: Problems with pluralization...and active record.find
My bad, please ignore my previous message. Did you restart the server after adding your custom inflection rule. Cheers, Ganesh Gunasegaran. SageWork - Simplify IT(http://www.sagework.com) On Fri, Jul 25, 2008 at 5:00 PM, Ganesh Gunasegaran <me-GxHoNkCV/tgAvxtiuMwx3w@public.gmane.org> wrote:> Seems like you still have the older migration (klasses) applied to your > database. > > Reapply the migration > > rake db:migrate VERSION=0 > rake db:migrate > > > Cheers, > Ganesh Gunasegaran. > SageWork - Simplify IT(http://www.sagework.com) > > On Fri, 2008-07-25 at 01:00 -0700, JamesR wrote: > > Created a new model ''klasse'' using scaffold, which was pluralised to > > ''klasses'', which I don''t want! > > Removed all concerning ''klasse'' and ''klasses'' in the model. > > Added inflection "inflect.irregular ''klasse'', ''klassen''" to > > inflections.rb. > > Recreated model again using scaffold. > > > > URL: http://localhost:3000/klassen fails with the following: > > > > Mysql::Error: #42S02Table ''schule_development.klasses'' doesn''t exist: > > SELECT * FROM `klasses` > > > > Seems rails is still hanging onto ''klasses'' somewhere, but where? > > > > Any ideas anyone? > > > > JamesR > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Did you check all the files created by your scaffold, including the migrations? Also if you change the inflections, you should restart your environment (stop/start the server) before they are applied. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---