aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides/activerecord/association_basics.txt
diff options
context:
space:
mode:
authorMike Gunderloy <MikeG1@larkfarm.com>2008-09-28 16:08:25 -0500
committerMike Gunderloy <MikeG1@larkfarm.com>2008-09-28 16:09:08 -0500
commit39607fa159aee0d3b9feb11a4c184e6d98610af5 (patch)
treeccb197fa2f81d19fb75595dbe4fe3bc727a1e280 /railties/doc/guides/activerecord/association_basics.txt
parentc492288d1660f016f4b2cd1ed299e31786886a9b (diff)
downloadrails-39607fa159aee0d3b9feb11a4c184e6d98610af5.tar.gz
rails-39607fa159aee0d3b9feb11a4c184e6d98610af5.tar.bz2
rails-39607fa159aee0d3b9feb11a4c184e6d98610af5.zip
Back mentions of accessible out of Associations guide
Diffstat (limited to 'railties/doc/guides/activerecord/association_basics.txt')
-rw-r--r--railties/doc/guides/activerecord/association_basics.txt40
1 files changed, 20 insertions, 20 deletions
diff --git a/railties/doc/guides/activerecord/association_basics.txt b/railties/doc/guides/activerecord/association_basics.txt
index 00402d5eda..b91052f91f 100644
--- a/railties/doc/guides/activerecord/association_basics.txt
+++ b/railties/doc/guides/activerecord/association_basics.txt
@@ -618,7 +618,7 @@ end
The +belongs_to+ association supports these options:
-* +:accessible+
+// * +:accessible+
* +:class_name+
* +:conditions+
* +:counter_cache+
@@ -630,10 +630,10 @@ The +belongs_to+ association supports these options:
* +:select+
* +:validate+
-===== +:accessible+
-
-The +:accessible+ option is the association version of +ActiveRecord::Base#attr_accessible+. If you set the +:accessible+ option to true, then mass assignment is allowed for this association.
-
+// ===== +:accessible+
+//
+// The +:accessible+ option is the association version of +ActiveRecord::Base#attr_accessible+. If you set the +:accessible+ option to true, then mass // assignment is allowed for this association.
+//
===== +:class_name+
If the name of the other model cannot be derived from the association name, you can use the +:class_name+ option to supply the model name. For example, if an order belongs to a customer, but the actual name of the model containing customers is patron, you'd set things up this way:
@@ -871,7 +871,7 @@ end
The +has_one+ association supports these options:
-* +:accessible+
+// * +:accessible+
* +:as+
* +:class_name+
* +:conditions+
@@ -887,10 +887,10 @@ The +has_one+ association supports these options:
* +:through+
* +:validate+
-===== +:accessible+
-
-The +:accessible+ option is the association version of +ActiveRecord::Base#attr_accessible+. If you set the +:accessible+ option to true, then mass assignment is allowed for this association.
-
+// ===== +:accessible+
+//
+// The +:accessible+ option is the association version of +ActiveRecord::Base#attr_accessible+. If you set the +:accessible+ option to true, then mass // assignment is allowed for this association.
+//
===== +:as+
Setting the +:as+ option indicates that this is a polymorphic association. Polymorphic associations are discussed in detail later in this guide.
@@ -1174,7 +1174,7 @@ end
The +has_many+ association supports these options:
-* +:accessible+
+// * +:accessible+
* +:as+
* +:class_name+
* +:conditions+
@@ -1197,10 +1197,10 @@ The +has_many+ association supports these options:
* +:uniq+
* +:validate+
-===== +:accessible+
-
-The +:accessible+ option is the association version of +ActiveRecord::Base#attr_accessible+. If you set the +:accessible+ option to true, then mass assignment is allowed for this association.
-
+// ===== +:accessible+
+//
+// The +:accessible+ option is the association version of +ActiveRecord::Base#attr_accessible+. If you set the +:accessible+ option to true, then mass // assignment is allowed for this association.
+//
===== +:as+
Setting the +:as+ option indicates that this is a polymorphic association, as discussed earlier in this guide.
@@ -1559,7 +1559,7 @@ end
The +has_and_belongs_to_many+ association supports these options:
-* +:accessible+
+// * +:accessible+
* +:association_foreign_key+
* +:class_name+
* +:conditions+
@@ -1580,10 +1580,10 @@ The +has_and_belongs_to_many+ association supports these options:
* +:uniq+
* +:validate+
-===== +:accessible+
-
-The +:accessible+ option is the association version of +ActiveRecord::Base#attr_accessible+. If you set the +:accessible+ option to true, then mass assignment is allowed for this association.
-
+// ===== +:accessible+
+//
+// The +:accessible+ option is the association version of +ActiveRecord::Base#attr_accessible+. If you set the +:accessible+ option to true, then mass // assignment is allowed for this association.
+//
===== +:association_foreign_key+
By convention, Rails guesses that the column in the join table used to hold the foreign key pointing to the other model is the name of that model with the suffix +_id+ added. The +:association_foreign_key+ option lets you set the name of the foreign key directly: