aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides/html/association_basics.html
diff options
context:
space:
mode:
Diffstat (limited to 'railties/doc/guides/html/association_basics.html')
-rw-r--r--railties/doc/guides/html/association_basics.html32
1 files changed, 16 insertions, 16 deletions
diff --git a/railties/doc/guides/html/association_basics.html b/railties/doc/guides/html/association_basics.html
index de84551aef..012a1a0156 100644
--- a/railties/doc/guides/html/association_basics.html
+++ b/railties/doc/guides/html/association_basics.html
@@ -433,7 +433,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="admonitionblock">
<table><tr>
<td class="icon">
-<img src="/Users/lifo/Docs/docrails/railties/doc/guides/source/icons/note.png" alt="Note" />
+<img src="./images/icons/note.png" alt="Note" />
</td>
<td class="content">The name of the other model is pluralized when declaring a <tt>has_many</tt> association.</td>
</tr></table>
@@ -573,7 +573,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="admonitionblock">
<table><tr>
<td class="icon">
-<img src="/Users/lifo/Docs/docrails/railties/doc/guides/source/icons/note.png" alt="Note" />
+<img src="./images/icons/note.png" alt="Note" />
</td>
<td class="content">Using <tt>t.integer :supplier_id</tt> makes the foreign key naming obvious and implicit. In current versions of Rails, you can abstract away this implementation detail by using <tt>t.references :supplier</tt> instead.</td>
</tr></table>
@@ -777,7 +777,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="admonitionblock">
<table><tr>
<td class="icon">
-<img src="/Users/lifo/Docs/docrails/railties/doc/guides/source/icons/warning.png" alt="Warning" />
+<img src="./images/icons/warning.png" alt="Warning" />
</td>
<td class="content">The precedence between model names is calculated using the <tt>&lt;</tt> operator for <tt>String</tt>. This means that if the strings are of different lengths, and the strings are equal when compared up to the shortest length, then the longer string is considered of higher lexical precedence than the shorter one. For example, one would expect the tables "paper_boxes" and "papers" to generate a join table name of "papers_paper_boxes" because of the length of the name "paper_boxes", but it in fact generates a join table name of "paper_boxes_papers".</td>
</tr></table>
@@ -1112,7 +1112,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="admonitionblock">
<table><tr>
<td class="icon">
-<img src="/Users/lifo/Docs/docrails/railties/doc/guides/source/icons/warning.png" alt="Warning" />
+<img src="./images/icons/warning.png" alt="Warning" />
</td>
<td class="content">You should not specify this option on a <tt>belongs_to</tt> association that is connected with a <tt>has_many</tt> association on the other class. Doing so can lead to orphaned records in your database.</td>
</tr></table>
@@ -1131,7 +1131,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="admonitionblock">
<table><tr>
<td class="icon">
-<img src="/Users/lifo/Docs/docrails/railties/doc/guides/source/icons/tip.png" alt="Tip" />
+<img src="./images/icons/tip.png" alt="Tip" />
</td>
<td class="content">In any case, Rails will not create foreign key columns for you. You need to explicitly define them as part of your migrations.</td>
</tr></table>
@@ -1174,7 +1174,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="admonitionblock">
<table><tr>
<td class="icon">
-<img src="/Users/lifo/Docs/docrails/railties/doc/guides/source/icons/note.png" alt="Note" />
+<img src="./images/icons/note.png" alt="Note" />
</td>
<td class="content">There's no need to use <tt>:include</tt> for immediate associations - that is, if you have <tt>Order belongs_to :customer</tt>, then the customer is eager-loaded automatically when it's needed.</td>
</tr></table>
@@ -1414,7 +1414,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="admonitionblock">
<table><tr>
<td class="icon">
-<img src="/Users/lifo/Docs/docrails/railties/doc/guides/source/icons/tip.png" alt="Tip" />
+<img src="./images/icons/tip.png" alt="Tip" />
</td>
<td class="content">In any case, Rails will not create foreign key columns for you. You need to explicitly define them as part of your migrations.</td>
</tr></table>
@@ -1606,7 +1606,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="admonitionblock">
<table><tr>
<td class="icon">
-<img src="/Users/lifo/Docs/docrails/railties/doc/guides/source/icons/warning.png" alt="Warning" />
+<img src="./images/icons/warning.png" alt="Warning" />
</td>
<td class="content">Objects will be in addition destroyed if they're associated with <tt>:dependent &#8658; :destroy</tt>, and deleted if they're associated with <tt>:dependent &#8658; :delete_all</tt>.</td>
</tr></table>
@@ -1834,7 +1834,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="admonitionblock">
<table><tr>
<td class="icon">
-<img src="/Users/lifo/Docs/docrails/railties/doc/guides/source/icons/note.png" alt="Note" />
+<img src="./images/icons/note.png" alt="Note" />
</td>
<td class="content">If you specify <tt>:finder_sql</tt> but not <tt>:counter_sql</tt>, then the counter SQL will be generated by substituting <tt>SELECT COUNT(*) FROM</tt> for the <tt>SELECT &#8230; FROM</tt> clause of your <tt>:finder_sql</tt> statement.</td>
</tr></table>
@@ -1844,7 +1844,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="admonitionblock">
<table><tr>
<td class="icon">
-<img src="/Users/lifo/Docs/docrails/railties/doc/guides/source/icons/note.png" alt="Note" />
+<img src="./images/icons/note.png" alt="Note" />
</td>
<td class="content">This option is ignored when you use the <tt>:through</tt> option on the association.</td>
</tr></table>
@@ -1867,7 +1867,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="admonitionblock">
<table><tr>
<td class="icon">
-<img src="/Users/lifo/Docs/docrails/railties/doc/guides/source/icons/tip.png" alt="Tip" />
+<img src="./images/icons/tip.png" alt="Tip" />
</td>
<td class="content">In any case, Rails will not create foreign key columns for you. You need to explicitly define them as part of your migrations.</td>
</tr></table>
@@ -1951,7 +1951,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="admonitionblock">
<table><tr>
<td class="icon">
-<img src="/Users/lifo/Docs/docrails/railties/doc/guides/source/icons/warning.png" alt="Warning" />
+<img src="./images/icons/warning.png" alt="Warning" />
</td>
<td class="content">If you specify your own <tt>:select</tt>, be sure to include the primary key and foreign key columns of the associated model. If you do not, Rails will throw an error.</td>
</tr></table>
@@ -2077,7 +2077,7 @@ assemblies<span style="color: #990000">.</span>create<span style="color: #990000
<div class="admonitionblock">
<table><tr>
<td class="icon">
-<img src="/Users/lifo/Docs/docrails/railties/doc/guides/source/icons/warning.png" alt="Warning" />
+<img src="./images/icons/warning.png" alt="Warning" />
</td>
<td class="content">The use of extra attributes on the join table in a <tt>has_and_belongs_to_many</tt> association is deprecated. If you require this sort of complex behavior on the table that joins two models in a many-to-many relationship, you should use a <tt>has_many :through</tt> association instead of <tt>has_and_belongs_to_many</tt>.</td>
</tr></table>
@@ -2103,7 +2103,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="admonitionblock">
<table><tr>
<td class="icon">
-<img src="/Users/lifo/Docs/docrails/railties/doc/guides/source/icons/note.png" alt="Note" />
+<img src="./images/icons/note.png" alt="Note" />
</td>
<td class="content">This method is aliased as <tt><em>collection</em>.concat</tt> and <tt><em>collection</em>.push</tt>.</td>
</tr></table>
@@ -2296,7 +2296,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="admonitionblock">
<table><tr>
<td class="icon">
-<img src="/Users/lifo/Docs/docrails/railties/doc/guides/source/icons/tip.png" alt="Tip" />
+<img src="./images/icons/tip.png" alt="Tip" />
</td>
<td class="content">The <tt>:foreign_key</tt> and <tt>:association_foreign_key</tt> options are useful when setting up a many-to-many self-join. For example:</td>
</tr></table>
@@ -2349,7 +2349,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="admonitionblock">
<table><tr>
<td class="icon">
-<img src="/Users/lifo/Docs/docrails/railties/doc/guides/source/icons/note.png" alt="Note" />
+<img src="./images/icons/note.png" alt="Note" />
</td>
<td class="content">If you specify <tt>:finder_sql</tt> but not <tt>:counter_sql</tt>, then the counter SQL will be generated by substituting <tt>SELECT COUNT(*) FROM</tt> for the <tt>SELECT &#8230; FROM</tt> clause of your <tt>:finder_sql</tt> statement.</td>
</tr></table>