Skip to main content
0 online
iwz Jun 7, 2006

NICE http://wiki.rubyonrails.org/rails/pages/UnderstandingPolymorphicAssociations Looks like I should be able to do this: q[class Comment true end]q q[class Journal :commentable end...

iwz iwz

And it looks like I'll be able to take advantage of Single Table Inheritance for the three similar models (News, Journals, ForumThreads), and at the same time take advantage of the Polymorphic Association with :as => :commentable for all the various models that accept comments.

NICE

iwz iwz

Yep, I found a bug. STI and Polymorphic Associations don't play together nicely all the time. nzkoz (rails core member) says it's a real live defect.

Details here http://rafb.net/paste/results/cVQNiO28.html

iwz iwz

Ok, not a bug. Whew. This is good news.

Welcome Back to eZabel

It's been a while. Here's what's new.

eZabel Lore

A complete history of our community — stats, Hall of Fame, legendary threads, and more.

View the Lore →

Everything Preserved

All 225,969 pieces of content from 2000–2014 are here — forums, messages, journals, photos, polls, and events.

💎

Gems

Spot something you love — a legendary comment, a classic thread, a great photo? Log in and click the diamond icon to mark it as a Gem. Add a note about why it's special. The best stuff surfaces on the Gems page.