Polymorphism with Many-to-Many Associations – A Teach Me To Code Tutorial
Devchat.tv Episode Roundup
English - June 03, 2011 20:32 - 20 minutes - 96.6 MB VideoHow To Education Business Careers programming javascript web framework development front end developer programmer internet node Homepage Download Apple Podcasts Google Podcasts Overcast Castro Pocket Casts RSS feed
Previous Episode: Gary Bernhardt Interview – Teach Me To Code Podcast
Next Episode: 006 RR Conferences and User Groups
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