aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/association_basics.md
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikachu.com>2012-09-02 14:52:12 -0400
committerPrem Sichanugrist <s@sikac.hu>2012-09-17 15:54:23 -0400
commit2e89ac34cf25d1045dcef50d1a03dd84fb37d739 (patch)
tree51344096ba654d353eae8dc3503d874b3d9f81f7 /guides/source/association_basics.md
parent2c38567646791f223b4e48550fba0e0386a05d96 (diff)
downloadrails-2e89ac34cf25d1045dcef50d1a03dd84fb37d739.tar.gz
rails-2e89ac34cf25d1045dcef50d1a03dd84fb37d739.tar.bz2
rails-2e89ac34cf25d1045dcef50d1a03dd84fb37d739.zip
Convert image tags to Markdown syntax
Diffstat (limited to 'guides/source/association_basics.md')
-rw-r--r--guides/source/association_basics.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/guides/source/association_basics.md b/guides/source/association_basics.md
index 8364b60ca3..a5e0f39b1e 100644
--- a/guides/source/association_basics.md
+++ b/guides/source/association_basics.md
@@ -89,7 +89,7 @@ class Order < ActiveRecord::Base
end
```
-!images/belongs_to.png(belongs_to Association Diagram)!
+![belongs_to Association Diagram](images/belongs_to.png)
NOTE: `belongs_to` associations _must_ use the singular term. If you used the pluralized form in the above example for the `customer` association in the `Order` model, you would be told that there was an "uninitialized constant Order::Customers". This is because Rails automatically infers the class name from the association name. If the association name is wrongly pluralized, then the inferred class will be wrongly pluralized too.
@@ -103,7 +103,7 @@ class Supplier < ActiveRecord::Base
end
```
-!images/has_one.png(has_one Association Diagram)!
+![has_one Association Diagram](images/has_one.png)
### The `has_many` Association
@@ -117,7 +117,7 @@ end
NOTE: The name of the other model is pluralized when declaring a `has_many` association.
-!images/has_many.png(has_many Association Diagram)!
+![has_many Association Diagram](images/has_many.png)
### The `has_many :through` Association
@@ -140,7 +140,7 @@ class Patient < ActiveRecord::Base
end
```
-!images/has_many_through.png(has_many :through Association Diagram)!
+![has_many :through Association Diagram](images/has_many_through.png)
The collection of join models can be managed via the API. For example, if you assign
@@ -196,7 +196,7 @@ class AccountHistory < ActiveRecord::Base
end
```
-!images/has_one_through.png(has_one :through Association Diagram)!
+![has_one :through Association Diagram](images/has_one_through.png)
### The `has_and_belongs_to_many` Association
@@ -212,7 +212,7 @@ class Part < ActiveRecord::Base
end
```
-!images/habtm.png(has_and_belongs_to_many Association Diagram)!
+![has_and_belongs_to_many Association Diagram](images/habtm.png)
### Choosing Between `belongs_to` and `has_one`
@@ -339,7 +339,7 @@ class CreatePictures < ActiveRecord::Migration
end
```
-!images/polymorphic.png(Polymorphic Association Diagram)!
+![Polymorphic Association Diagram](images/polymorphic.png)
### Self Joins