Overriding Active Record
Posted in Rails on Apr 29th, 2008 No Comments »
1. If one wishes the table name should be singular instead of plural
Set the below configuration
ActiveRecord::Base.pluralize_table_names = false
2. If you want your model’s classname should represent a table of someother name
class Name < ActiveRecord::Base
# by defualt it refers to “names” table in DB
# Now let it refer to “nicknames”
[…]

