aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbdelkader Boudih <terminale@gmail.com>2015-03-01 19:22:13 +0000
committerAbdelkader Boudih <terminale@gmail.com>2015-03-01 19:22:13 +0000
commit1d10b4bdacf02e6089d2d8f3e379890db9874d12 (patch)
treea96d60343cbb96fb4e45c786fdfc1ac43dc55aae
parentedbcdb95ff03dada1408d336f96466a64230c829 (diff)
parent683ad0b471c968800a9cbe805eac6199c948a806 (diff)
downloadrails-1d10b4bdacf02e6089d2d8f3e379890db9874d12.tar.gz
rails-1d10b4bdacf02e6089d2d8f3e379890db9874d12.tar.bz2
rails-1d10b4bdacf02e6089d2d8f3e379890db9874d12.zip
Merge pull request #19153 from stephenminded/docs_fix_polymorphic_index
[docs fix] Indexing a polymorphic assoc adds index on type and id
-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 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
```