1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #19153 from stephenminded/docs_fix_polymorphic_index

[docs fix] Indexing a polymorphic assoc adds index on type and id
This commit is contained in:
Abdelkader Boudih 2015-03-01 19:22:13 +00:00
commit 1d10b4bdac

View file

@ -460,7 +460,7 @@ class CreatePictures < ActiveRecord::Migration
t.timestamps null: false t.timestamps null: false
end end
add_index :pictures, :imageable_id add_index :pictures, [:imageable_id, :imageable_type]
end end
end end
``` ```