aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-02-06 01:57:02 +0000
committerPratik Naik <pratiknaik@gmail.com>2009-02-06 02:01:22 +0000
commit96d610553e5fdaabc923835ab1f194070ddb4477 (patch)
tree5154390d4f47971d522619db9f3826abb771b42f /activerecord/lib
parentbccd2c54b2c7708f881faf9c9464dcf29bd30bef (diff)
downloadrails-96d610553e5fdaabc923835ab1f194070ddb4477.tar.gz
rails-96d610553e5fdaabc923835ab1f194070ddb4477.tar.bz2
rails-96d610553e5fdaabc923835ab1f194070ddb4477.zip
Merge docrails along with the new guides and guides generation code
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-xactiverecord/lib/active_record/associations.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 3f2b5d726e..05ce8ff0b5 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1090,6 +1090,22 @@ module ActiveRecord
# 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.
#
+ # 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:
+ #
+ # class CreateDevelopersProjectsJoinTable < ActiveRecord::Migration
+ # def self.up
+ # 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
+ #
# Deprecated: Any additional fields added to the join table will be placed as attributes when pulling records out through
# +has_and_belongs_to_many+ associations. Records returned from join tables with additional attributes will be marked as
# readonly (because we can't save changes to the additional attributes). It's strongly recommended that you upgrade any