aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorwangjohn <wangjohn@mit.edu>2013-05-11 22:56:05 -0400
committerwangjohn <wangjohn@mit.edu>2013-05-11 23:05:36 -0400
commit346cda4f348993b45a894c1351e2cca03d72dee2 (patch)
tree47e0359fb71bbd7432c743f4798261ed8072bef7 /guides
parentd9e8ec61a4988f3836d8c6aa830b6ffd6a3a940a (diff)
downloadrails-346cda4f348993b45a894c1351e2cca03d72dee2.tar.gz
rails-346cda4f348993b45a894c1351e2cca03d72dee2.tar.bz2
rails-346cda4f348993b45a894c1351e2cca03d72dee2.zip
Adding documentation to the automatic inverse_of finder.
Diffstat (limited to 'guides')
-rw-r--r--guides/source/association_basics.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/guides/source/association_basics.md b/guides/source/association_basics.md
index 8d203d265a..16a5241319 100644
--- a/guides/source/association_basics.md
+++ b/guides/source/association_basics.md
@@ -693,6 +693,17 @@ There are a few limitations to `inverse_of` support:
* They do not work with `:as` associations.
* For `belongs_to` associations, `has_many` inverse associations are ignored.
+Every association will attempt to automatically find the inverse association
+and set the `:inverse_of` option heuristically (based on the association name).
+Most associations with standard names will be supported. However, associations
+that contain the following options will not have their inverses set
+automatically:
+
+* :conditions
+* :through
+* :polymorphic
+* :foreign_key
+
Detailed Association Reference
------------------------------