aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
diff options
context:
space:
mode:
authorMarc Schütz <schuetz@yoocon.de>2013-02-20 22:18:06 +0100
committerMarc Schütz <schuetz@yoocon.de>2013-02-20 22:18:06 +0100
commit743d15bba182df80d003d205690ead988970299c (patch)
treedc40635a08448801b5bfd616be4aa9cd57b24ff2 /activerecord/lib/active_record/connection_adapters
parent8fc6b9b4c8d6b71446b519837c99d51725dcf848 (diff)
downloadrails-743d15bba182df80d003d205690ead988970299c.tar.gz
rails-743d15bba182df80d003d205690ead988970299c.tar.bz2
rails-743d15bba182df80d003d205690ead988970299c.zip
Add more documentation for create_join_table.
Explain that it doesn't create indices by default and that it also has a block form.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb8
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..b3e28d387e 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: