diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-02-04 13:37:11 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-02-04 13:38:48 +0100 |
commit | c7abc516f8fd7ccc4ae2bb528404ffb8a46ba4ba (patch) | |
tree | 348bf397cbe4017341205be362ba18ee2b0b531a /guides/source | |
parent | 702e0e1a6b6d776b0527f68d78a50714312fe149 (diff) | |
download | rails-c7abc516f8fd7ccc4ae2bb528404ffb8a46ba4ba.tar.gz rails-c7abc516f8fd7ccc4ae2bb528404ffb8a46ba4ba.tar.bz2 rails-c7abc516f8fd7ccc4ae2bb528404ffb8a46ba4ba.zip |
docs, link MySQL manual for multi column indexes. [ci ckip].
Closes #9131.
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/active_record_validations.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md index b04c7a90e2..0ea2b86bb4 100644 --- a/guides/source/active_record_validations.md +++ b/guides/source/active_record_validations.md @@ -575,7 +575,9 @@ This helper validates that the attribute's value is unique right before the object gets saved. It does not create a uniqueness constraint in the database, so it may happen that two different database connections create two records with the same value for a column that you intend to be unique. To avoid that, -you must create a unique index in your database. +you must create a unique index on both columns in your database. See +[the MySQL manual](http://dev.mysql.com/doc/refman/5.6/en/multiple-column-indexes.html) +for more details about multi column indexes. ```ruby class Account < ActiveRecord::Base |