# Polymorphism with Many-to-Many Associations – A Teach Me To Code Tutorial

> Episode of [Teach Me To Code » Screencasts](https://podistic.com/podcast/teach-me-to-code-screencasts.md) · Published June 3, 2011 · Duration 20:03

- **Listen on Podistic:** https://podistic.com/episode/1297--polymorphism-with-many-to-many-associations-a-teach-me-to-code-tutorial
- **Audio:** http://traffic.libsyn.com/tmtc/polymorphicmanytomany.m4v (video/x-m4v)

## About this episode

Polymorphic associations are very simple, as are many-to-many associations. When you blend the two, it's not nearly as simple. Since there isn't a working build-in mechanism for many-to-many polymorphic associations.

Here's a quick demo of what happens if you try to set up a traditional has_many :through association with a polymorphic association. I also show how to set things up so you can get the associated objects.

Download 101.3 MB
Download (iPod & iPhone) 45.5 MB
