aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorTim Wade <hello@timjwade.com>2015-05-22 21:37:42 -0700
committerTim Wade <hello@timjwade.com>2015-05-22 21:37:42 -0700
commit5a81779610f7e21d28632f550b10cffe416f13f4 (patch)
treedae081be19f2dfaf5385a9ea24ca03c6a6242da2 /guides/source
parentf2e2086d530f0535f1e155cf23de6a7ba392d8e4 (diff)
downloadrails-5a81779610f7e21d28632f550b10cffe416f13f4.tar.gz
rails-5a81779610f7e21d28632f550b10cffe416f13f4.tar.bz2
rails-5a81779610f7e21d28632f550b10cffe416f13f4.zip
[ci skip] Fix markdown issue in association basics docs.
The quoted underscore is being intepreted as markdown, causing the entire phrase to be italicized.
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/association_basics.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/association_basics.md b/guides/source/association_basics.md
index bfc88794c5..9bc12cf1cf 100644
--- a/guides/source/association_basics.md
+++ b/guides/source/association_basics.md
@@ -590,7 +590,7 @@ If you create an association some time after you build the underlying model, you
If you create a `has_and_belongs_to_many` association, you need to explicitly create the joining table. Unless the name of the join table is explicitly specified by using the `:join_table` option, Active Record creates the name by using the lexical order of the class names. So a join between customer and order models will give the default join table name of "customers_orders" because "c" outranks "o" in lexical ordering.
-WARNING: The precedence between model names is calculated using the `<=>` operator for `String`. 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" (because the underscore '_' is lexicographically _less_ than 's' in common encodings).
+WARNING: The precedence between model names is calculated using the `<=>` operator for `String`. 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" (because the underscore '\_' is lexicographically _less_ than 's' in common encodings).
Whatever the name, you must manually generate the join table with an appropriate migration. For example, consider these associations: