diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-03-10 11:48:27 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-03-10 15:44:16 +0100 |
commit | 12d57cac5fc27dddc5534088cca6bb3133fab5ea (patch) | |
tree | 644a7c168543b18743e2ba9c07ba34a469fe340d /activerecord/lib | |
parent | dff4d4ad2b7b55283132eb6cf8ac27b13827624c (diff) | |
download | rails-12d57cac5fc27dddc5534088cca6bb3133fab5ea.tar.gz rails-12d57cac5fc27dddc5534088cca6bb3133fab5ea.tar.bz2 rails-12d57cac5fc27dddc5534088cca6bb3133fab5ea.zip |
document habtm join-table name with custom prefix [ci skip].
Closes #9643.
The logic was introduced with 46492949
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 2 |
1 files changed, 2 insertions, 0 deletions
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 <tt>:join_table</tt> 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: |