Mat Brown wrote:
> On Tue, Feb 9, 2010 at 05:40, tsenart <[email protected]> wrote:
>> �habtm_polymorphs [:articles]
>> � �rev = Relationship.new :origin => self.destination, :destination
>> �def self.habtm_polymorphs(associations, options={})
>> � �has_many pjoin, :as => pfrom
>> � � �})
>> � � � �args = [args].flatten
>>
>> @asset.articles = Article.first
>>>
>>> This way there's only on table to track all these relations. It allows
>>> > impatient, here's a backport:
>>> > > To post to this group, send email to [email protected].
>>> > > To unsubscribe from this group, send email to 
>>> > > [email protected].
>>> > > For more options, visit this group 
>>> > > athttp://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Ruby on Rails: Talk" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to 
>> [email protected].
>> For more options, visit this group at 
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>>
> 
> Ah, I see what you're getting at.
> 
> When I've had to do that, I use full-blown model for the join table,
> and then a has_many :through to define the relationship between the
> endpoints. It's not a perfect solution but probably the best that's
> possible in AR.

Would has_many_polymorphs help?

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to