Ruby on Rails
HowtoDisableAutoTableNamePluralisation

Add the line:


config.active_record.pluralize_table_names = false

in the Rails::Initializer block of:


rails_application_path/config/environment.rb

If this doesn’t work, try this line:


ActiveRecord::Base.pluralize_table_names = false 


Question: You will have to do extra work to make fixtures work in unit tests, right?


What about a table named equipment? I added the line:
set_table_name "equipment" to the equipment model, but then ./script/generate scaffold Equipment Equipment failed to generate the _form.rhtml properly.

The scaffold generator does not read anything from the Model. So far the dev team does not plan on fixing it, won’tfix bug



Question: What if NONE of the two ways of turning pluralization off DOESN’T work ? I have Rails version 1.2.3 along with Ruby 1.8.6 and none of the methods work for me (and I’m desperate about turning that pluralisation thing off). Thanks in advance for any merciful response