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
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.
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 G…
SageWork - Simplify IT(http://www.sagework.com)
My bad, please ignore my previous message. Did you restart the server
after
adding your custom inflection rule.
Cheers,
Ganesh G…
SageWork - Simplify IT(http://www.sagework.com)
Great, that was it. Thanks.