aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-10-23 01:38:37 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2011-10-23 01:38:37 +0530
commit8698debcc2ad16fbc10340fc39afcba6b1503652 (patch)
tree1a9d005d6ae843d114376bda3607d3ff73f8b0b2 /activerecord
parent337ff13be98f730b9abddbec7023e187823bfa7b (diff)
parent227c31f7b6b13fcfc187d20618ed14d2970314c7 (diff)
downloadrails-8698debcc2ad16fbc10340fc39afcba6b1503652.tar.gz
rails-8698debcc2ad16fbc10340fc39afcba6b1503652.tar.bz2
rails-8698debcc2ad16fbc10340fc39afcba6b1503652.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/associations.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 0952ea2829..34684ad2f5 100644
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1424,18 +1424,18 @@ module ActiveRecord
# join table with a migration such as this:
#
# class CreateDevelopersProjectsJoinTable < ActiveRecord::Migration
- # def self.up
+ # def change
# create_table :developers_projects, :id => false do |t|
# t.integer :developer_id
# t.integer :project_id
# end
# end
- #
- # def self.down
- # drop_table :developers_projects
- # end
# end
#
+ # It's also a good idea to add indexes to each of those columns to speed up the joins process.
+ # However, in MySQL it is advised to add a compound index for both of the columns as MySQL only
+ # uses one index per table during the lookup.
+ #
# Adds the following methods for retrieval and query:
#
# [collection(force_reload = false)]