diff options
author | Xavier Noria <fxn@hashref.com> | 2013-02-21 04:04:12 -0800 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2013-02-21 04:04:12 -0800 |
commit | b0fa9b59c8c9cac52d4eb4d8d984b85d4a753e97 (patch) | |
tree | a2a09dbf4a545dea0fc09eeece6a47618e7f33c6 /activerecord | |
parent | 34c133ac6108786fd8378db5b906cb2d846450fa (diff) | |
parent | 5b5f7a6b5c4b12a341043bfa348173f9732ef383 (diff) | |
download | rails-b0fa9b59c8c9cac52d4eb4d8d984b85d4a753e97.tar.gz rails-b0fa9b59c8c9cac52d4eb4d8d984b85d4a753e97.tar.bz2 rails-b0fa9b59c8c9cac52d4eb4d8d984b85d4a753e97.zip |
Merge pull request #9348 from schuetzm/doc_no_indices_with_create_join_table
Add more documentation for create_join_table.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index b737268f61..9bae880024 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -192,6 +192,14 @@ module ActiveRecord # Set to true to drop the table before creating it. # Defaults to false. # + # Note that +create_join_table+ does not create any indices by default; you can use + # its block form to do so yourself: + # + # create_join_table :products, :categories do |t| + # t.index :products + # t.index :categories + # end + # # ====== Add a backend specific option to the generated SQL (MySQL) # create_join_table(:assemblies, :parts, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8') # generates: |