Ruby on Rails
HowtoDisableAutoTableNamePluralisation (Version #10)

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

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