diff options
author | Zachary Scott <e@zzak.io> | 2014-12-20 15:07:11 -0800 |
---|---|---|
committer | Zachary Scott <e@zzak.io> | 2014-12-20 15:07:11 -0800 |
commit | 356e95c009a3108e99182d8666de9e36facf3380 (patch) | |
tree | 52e8af4b8abcb2d42b3f0b0c2814cb6db2672248 /guides/source | |
parent | 6925c1468924b6d5a9228a63d7671a83a2af24a4 (diff) | |
download | rails-356e95c009a3108e99182d8666de9e36facf3380.tar.gz rails-356e95c009a3108e99182d8666de9e36facf3380.tar.bz2 rails-356e95c009a3108e99182d8666de9e36facf3380.zip |
Add note about the association between the two fixture files and how they're connection.
[ci skip]
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/testing.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md index 98bf901bb7..42b493fb73 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -98,6 +98,8 @@ one: category: about ``` +Notice the `category` key of the `one` article found in `fixtures/articles.yml` has a value of `about`. This tells Rails to load the category `about` found in `fixtures/categories.yml`. + Note: For associations to reference one another by name, you cannot specify the `id:` attribute on the fixtures. Rails will auto assign a primary key to be consistent between runs. If you manually specify an `id:` attribute, this behavior will not work. For more |