Skip to content

Commit

Permalink
Merge pull request #19153 from stephenminded/docs_fix_polymorphic_index
Browse files Browse the repository at this point in the history
[docs fix] Indexing a polymorphic assoc adds index on type and id
  • Loading branch information
seuros committed Mar 1, 2015
2 parents edbcdb9 + 683ad0b commit 1d10b4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/source/association_basics.md
Expand Up @@ -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
```
Expand Down

0 comments on commit 1d10b4b

Please sign in to comment.