aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-11-29 12:28:04 +0000
committerJon Leighton <j@jonathanleighton.com>2011-11-29 20:13:36 +0000
commit0b72a04d0c93b666c23500aefbe4a6a76593cd36 (patch)
treeade686831d089326d5a45a1cefe084950ed9bd8d /railties/guides/source
parentf73f53455a01a93bd90cb8c0cee1a7c54afdb301 (diff)
downloadrails-0b72a04d0c93b666c23500aefbe4a6a76593cd36.tar.gz
rails-0b72a04d0c93b666c23500aefbe4a6a76593cd36.tar.bz2
rails-0b72a04d0c93b666c23500aefbe4a6a76593cd36.zip
Deprecate set_table_name in favour of self.table_name= or defining your own method.
Diffstat (limited to 'railties/guides/source')
-rw-r--r--railties/guides/source/active_record_basics.textile4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/source/active_record_basics.textile b/railties/guides/source/active_record_basics.textile
index 66ad7b0255..487f8b70f9 100644
--- a/railties/guides/source/active_record_basics.textile
+++ b/railties/guides/source/active_record_basics.textile
@@ -101,11 +101,11 @@ h3. Overriding the Naming Conventions
What if you need to follow a different naming convention or need to use your Rails application with a legacy database? No problem, you can easily override the default conventions.
-You can use the +ActiveRecord::Base.set_table_name+ method to specify the table name that should be used:
+You can use the +ActiveRecord::Base.table_name=+ method to specify the table name that should be used:
<ruby>
class Product < ActiveRecord::Base
- set_table_name "PRODUCT"
+ self.table_name = "PRODUCT"
end
</ruby>