From c91a7db4cfa0b3fe256e441432f051d7de0d1c0c Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Fri, 4 Jan 2013 17:19:25 +0900 Subject: undecorated_table_name was moved and refactored --- guides/source/active_support_core_extensions.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'guides') diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md index b0c3400ea8..6543be07c5 100644 --- a/guides/source/active_support_core_extensions.md +++ b/guides/source/active_support_core_extensions.md @@ -1431,11 +1431,10 @@ As the previous example shows, Active Support knows some irregular plurals and u Active Record uses this method to compute the default table name that corresponds to a model: ```ruby -# active_record/base.rb +# active_record/model_schema.rb def undecorated_table_name(class_name = base_class.name) table_name = class_name.to_s.demodulize.underscore - table_name = table_name.pluralize if pluralize_table_names - table_name + pluralize_table_names ? table_name.pluralize : table_name end ``` -- cgit v1.2.3