From 12d57cac5fc27dddc5534088cca6bb3133fab5ea Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Sun, 10 Mar 2013 11:48:27 +0100 Subject: document habtm join-table name with custom prefix [ci skip]. Closes #9643. The logic was introduced with 46492949 --- activerecord/lib/active_record/associations.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 519e9112b8..06da5f2e0d 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1407,6 +1407,8 @@ module ActiveRecord # to generate a join table name of "papers_paper_boxes" because of the length of the name "paper_boxes", # but it in fact generates a join table name of "paper_boxes_papers". Be aware of this caveat, and use the # custom :join_table option if you need to. + # If your tables share a common prefix, it will only appear once at the beginning. For example, + # the tables "catalog_categories" and "catalog_products" generate a join table name of "catalog_categories_products". # # The join table should not have a primary key or a model associated with it. You must manually generate the # join table with a migration such as this: -- cgit v1.2.3