From: Michael Neumann Date: 2005-04-06T05:25:00+09:00 Subject: Re: Nitro + Og 0.15.0, Localization, Parametrized mixins, Morphing, SQLServer Am Dienstag 05 April 2005 22:19 schrieb George Moschovitis: > Does it allow duck-typing? > > > class Posting > > ... > > has_many :responses, [Approval, Disapproval] > > end > > I cannot understand what you mean. Can you please explain this a little > better? "Syntax-sugar" for: class Posting has_many :approval_responses, Approval has_many :disapproval_responses, Disapproval def responses self.approval_responses + self.disapproval_responses end def add_response(r) case r when Approval add_approval_response(r) when Disapproval add_disapproval_response(r) else raise end end end And if you could hide the meta for the :approval_responses and :disapproval_responses, this would be even better. Regards, Michael