Friday, 1 February 2008

Rails database table names: singular Vs. plural

Rails < 2.0 : You need to add into config/environment.rb file line
# Include your application configuration below
ActiveRecord::Base.pluralize_table_names = false #added line
Rails >= 2.0 : You need to add into config/environment.rb file inside block
Rails::Initializer.run do |config|
  config.active_record.pluralize_table_names = false #added line
end