Permalink
Browse files

fix quotes and ruby old hashes

  • Loading branch information...
1 parent d4794fd commit 1010f9382b81f5f3a02009126271ac0cbde4bc59 @Mik-die Mik-die committed Jun 15, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 guides/source/association_basics.md
@@ -1736,15 +1736,15 @@ If you want to make sure that, upon insertion, all of the records in the
persisted association are distinct (so that you can be sure that when you
inspect the association that you will never find duplicate records), you should
add a unique index on the table itself. For example, if you have a table named
-``person_posts`` and you want to make sure all the posts are unique, you could
+`person_posts` and you want to make sure all the posts are unique, you could
add the following in a migration:
```ruby
-add_index :person_posts, :post, :unique => true
+add_index :person_posts, :post, unique: true
```
-Note that checking for uniqueness using something like ``include?`` is subject
-to race conditions. Do not attempt to use ``include?`` to enforce distinctness
+Note that checking for uniqueness using something like `include?` is subject
+to race conditions. Do not attempt to use `include?` to enforce distinctness
in an association. For instance, using the post example from above, the
following code would be racy because multiple users could be attempting this
at the same time:

0 comments on commit 1010f93

Please sign in to comment.