diff options
author | Steve Lounsbury <steve.lounsbury@gmail.com> | 2015-03-01 14:06:38 -0500 |
---|---|---|
committer | Steve Lounsbury <steve.lounsbury@gmail.com> | 2015-03-01 14:06:38 -0500 |
commit | 683ad0b471c968800a9cbe805eac6199c948a806 (patch) | |
tree | a96d60343cbb96fb4e45c786fdfc1ac43dc55aae | |
parent | edbcdb95ff03dada1408d336f96466a64230c829 (diff) | |
download | rails-683ad0b471c968800a9cbe805eac6199c948a806.tar.gz rails-683ad0b471c968800a9cbe805eac6199c948a806.tar.bz2 rails-683ad0b471c968800a9cbe805eac6199c948a806.zip |
Indexing a polymorphic assoc adds index on type and id [ci skip]
-rw-r--r-- | guides/source/association_basics.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/association_basics.md b/guides/source/association_basics.md index d6b2e75e1e..52e154ad18 100644 --- a/guides/source/association_basics.md +++ b/guides/source/association_basics.md @@ -460,7 +460,7 @@ class CreatePictures < ActiveRecord::Migration t.timestamps null: false end - add_index :pictures, :imageable_id + add_index :pictures, [:imageable_id, :imageable_type] end end ``` |